This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Fix localplt failures for ARM EABI, add c++-types data
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Date: Tue, 8 Jul 2008 16:26:59 +0000 (UTC)
- Subject: Fix localplt failures for ARM EABI, add c++-types data
It's now possible for add-ons to provide c++-types and localplt data.
This patch adds such data to ports for ARM EABI, fixing the easy localplt
issues to keep down the number of symbols listed in that data.
2008-07-08 Joseph Myers <joseph@codesourcery.com>
* c++-types-arm-linux-gnueabi.data: New.
* localplt-arm-linux-gnueabi.data: New.
* sysdeps/arm/bsd-_setjmp.S: Use HIDDEN_JUMPTARGET to call
__sigsetjmp.
* sysdeps/arm/bsd-setjmp.S: Likewise.
* sysdeps/arm/eabi/aeabi_localeconv.c: Use __localeconv.
* sysdeps/arm/eabi/find_exidx.c (__gnu_Unwind_Find_exidx): Use
__dl_iterate_phdr.
* sysdeps/arm/eabi/setjmp.S: Add hidden_def (__sigsetjmp).
* sysdeps/arm/memmove.S: Use HIDDEN_JUMPTARGET to call memcpy from
within libc.
* sysdeps/arm/setjmp.S: Add hidden_def (__sigsetjmp).
* sysdeps/unix/sysv/linux/arm/clone.S: Use HIDDEN_JUMPTARGET to
call _exit.
* sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use __sysctl,
__readlink and fgets_unlocked.
(_ioperm): Use __open and __close.
diff -rupN ports.orig/c++-types-arm-linux-gnueabi.data ports/c++-types-arm-linux-gnueabi.data
--- ports.orig/c++-types-arm-linux-gnueabi.data 1970-01-01 00:00:00.000000000 +0000
+++ ports/c++-types-arm-linux-gnueabi.data 2008-07-08 16:21:49.000000000 +0000
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff -rupN ports.orig/localplt-arm-linux-gnueabi.data ports/localplt-arm-linux-gnueabi.data
--- ports.orig/localplt-arm-linux-gnueabi.data 1970-01-01 00:00:00.000000000 +0000
+++ ports/localplt-arm-linux-gnueabi.data 2008-07-08 16:21:49.000000000 +0000
@@ -0,0 +1,13 @@
+libc.so: __signbit
+libc.so: calloc
+libc.so: free
+libc.so: fscanf
+libc.so: malloc
+libc.so: memalign
+libc.so: raise
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: matherr
+libpthread.so: __errno_location
+libpthread.so: raise
diff -rupN ports.orig/sysdeps/arm/bsd-_setjmp.S ports/sysdeps/arm/bsd-_setjmp.S
--- ports.orig/sysdeps/arm/bsd-_setjmp.S 2002-12-31 20:37:22.000000000 +0000
+++ ports/sysdeps/arm/bsd-_setjmp.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version.
- Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,6 @@
ENTRY (_setjmp)
mov r1, #0
- b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
+ b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp))
END (_setjmp)
libc_hidden_def (_setjmp)
diff -rupN ports.orig/sysdeps/arm/bsd-setjmp.S ports/sysdeps/arm/bsd-setjmp.S
--- ports.orig/sysdeps/arm/bsd-setjmp.S 2001-07-06 04:55:48.000000000 +0000
+++ ports/sysdeps/arm/bsd-setjmp.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,5 @@
ENTRY (setjmp)
mov r1, #1
- b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
+ b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp))
END (setjmp)
diff -rupN ports.orig/sysdeps/arm/eabi/aeabi_localeconv.c ports/sysdeps/arm/eabi/aeabi_localeconv.c
--- ports.orig/sysdeps/arm/eabi/aeabi_localeconv.c 2005-10-31 20:49:25.000000000 +0000
+++ ports/sysdeps/arm/eabi/aeabi_localeconv.c 2008-07-08 16:21:49.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,5 +21,5 @@
struct lconv *
__aeabi_localeconv (void)
{
- return localeconv ();
+ return __localeconv ();
}
diff -rupN ports.orig/sysdeps/arm/eabi/find_exidx.c ports/sysdeps/arm/eabi/find_exidx.c
--- ports.orig/sysdeps/arm/eabi/find_exidx.c 2005-10-10 15:29:32.000000000 +0000
+++ ports/sysdeps/arm/eabi/find_exidx.c 2008-07-08 16:21:49.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -72,7 +72,7 @@ __gnu_Unwind_Find_exidx (_Unwind_Ptr pc,
data.pc = pc;
data.exidx_start = 0;
- if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
+ if (__dl_iterate_phdr (find_exidx_callback, &data) <= 0)
return 0;
*pcount = data.exidx_len / 8;
diff -rupN ports.orig/sysdeps/arm/eabi/setjmp.S ports/sysdeps/arm/eabi/setjmp.S
--- ports.orig/sysdeps/arm/eabi/setjmp.S 2006-09-22 11:38:36.000000000 +0000
+++ ports/sysdeps/arm/eabi/setjmp.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -94,3 +94,4 @@ Lhwcap:
END (__sigsetjmp)
+hidden_def (__sigsetjmp)
diff -rupN ports.orig/sysdeps/arm/memmove.S ports/sysdeps/arm/memmove.S
--- ports.orig/sysdeps/arm/memmove.S 2006-10-31 17:07:54.000000000 +0000
+++ ports/sysdeps/arm/memmove.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -66,7 +66,11 @@ ENTRY(memmove)
subs ip, r0, r1
cmphi r2, ip
+#ifdef NOT_IN_libc
bls memcpy
+#else
+ bls HIDDEN_JUMPTARGET(memcpy)
+#endif
stmfd sp!, {r0, r4, lr}
add r1, r1, r2
diff -rupN ports.orig/sysdeps/arm/setjmp.S ports/sysdeps/arm/setjmp.S
--- ports.orig/sysdeps/arm/setjmp.S 2001-07-06 04:55:48.000000000 +0000
+++ ports/sysdeps/arm/setjmp.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ ENTRY (__sigsetjmp)
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
END (__sigsetjmp)
+
+hidden_def (__sigsetjmp)
diff -rupN ports.orig/sysdeps/unix/sysv/linux/arm/clone.S ports/sysdeps/unix/sysv/linux/arm/clone.S
--- ports.orig/sysdeps/unix/sysv/linux/arm/clone.S 2005-11-16 19:03:42.000000000 +0000
+++ ports/sysdeps/unix/sysv/linux/arm/clone.S 2008-07-08 16:21:49.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -100,7 +100,7 @@ ENTRY(__clone)
ldr pc, [sp], #8
@ and we are done, passing the return value through r0
- b PLTJMP(_exit)
+ b PLTJMP(HIDDEN_JUMPTARGET(_exit))
PSEUDO_END (__clone)
diff -rupN ports.orig/sysdeps/unix/sysv/linux/arm/ioperm.c ports/sysdeps/unix/sysv/linux/arm/ioperm.c
--- ports.orig/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-04-22 18:50:06.000000000 +0000
+++ ports/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-07-08 16:21:49.000000000 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -110,14 +110,14 @@ init_iosys (void)
static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
- if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
- && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
+ if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+ && ! __sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
{
io.initdone = 1;
return 0;
}
- n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
+ n = __readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
if (n > 0)
{
systype[n] = '\0';
@@ -144,7 +144,7 @@ init_iosys (void)
if (n == 1)
break;
else
- fgets (systype, 256, fp);
+ fgets_unlocked (systype, 256, fp);
}
fclose (fp);
@@ -195,7 +195,7 @@ _ioperm (unsigned long int from, unsigne
{
int fd;
- fd = open ("/dev/mem", O_RDWR);
+ fd = __open ("/dev/mem", O_RDWR);
if (fd < 0)
return -1;
@@ -203,7 +203,7 @@ _ioperm (unsigned long int from, unsigne
(unsigned long int) __mmap (0, MAX_PORT << io.shift,
PROT_READ | PROT_WRITE,
MAP_SHARED, fd, io.io_base);
- close (fd);
+ __close (fd);
if ((long) io.base == -1)
return -1;
}
--
Joseph S. Myers
joseph@codesourcery.com