From aj@suse.de Tue Apr 1 06:39:00 2003 From: aj@suse.de (Andreas Jaeger) Date: Tue, 01 Apr 2003 06:39:00 -0000 Subject: Fix configure check for AS/LD. Message-ID: I just got a message that "t" is missing while running configure on a system with old binutils. Ok to commit the appended patch ? Andreas 2003-04-01 Andreas Jaeger * configure.in: Output binutils as name if version is too old. ============================================================ Index: configure.in --- configure.in 29 Mar 2003 08:15:27 -0000 1.389 +++ configure.in 1 Apr 2003 06:38:58 -0000 @@ -682,10 +682,10 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/ # Accept binutils 2.13 or newer. AC_CHECK_PROG_VER(AS, $AS, --version, [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[3-9]*], AS=: critic_missing=t) + [2.1[3-9]*], AS=: critic_missing=binutils) AC_CHECK_PROG_VER(LD, $LD, --version, [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[3-9]*], LD=: critic_missing=t) + [2.1[3-9]*], LD=: critic_missing=binutils) # We need the physical current working directory. We cannot use the # "pwd -P" shell builtin since that's not portable. Instead we try to -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From roland@redhat.com Tue Apr 1 06:47:00 2003 From: roland@redhat.com (Roland McGrath) Date: Tue, 01 Apr 2003 06:47:00 -0000 Subject: Fix configure check for AS/LD. In-Reply-To: Andreas Jaeger's message of Tuesday, 1 April 2003 08:39:22 +0200 Message-ID: <200304010647.h316laE12112@magilla.sf.frob.com> > I just got a message that "t" is missing while running configure on a > system with old binutils. > > Ok to commit the appended patch ? I'd use "as" and "ld" as appropriate. From aj@suse.de Tue Apr 1 06:49:00 2003 From: aj@suse.de (Andreas Jaeger) Date: Tue, 01 Apr 2003 06:49:00 -0000 Subject: Fix configure check for AS/LD. In-Reply-To: <200304010647.h316laE12112@magilla.sf.frob.com> (Roland McGrath's message of "Mon, 31 Mar 2003 22:47:36 -0800") References: <200304010647.h316laE12112@magilla.sf.frob.com> Message-ID: Roland McGrath writes: >> I just got a message that "t" is missing while running configure on a >> system with old binutils. >> >> Ok to commit the appended patch ? > > I'd use "as" and "ld" as appropriate. OK, I'll commit the changed version then, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From jakub@redhat.com Tue Apr 1 15:19:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 01 Apr 2003 15:19:00 -0000 Subject: [PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads Message-ID: <20030401151926.GI16629@sunsite.ms.mff.cuni.cz> Hi! linuxthreads call sigsuspend from pthread_mutex_lock etc., so when sigsuspend was made cancellation point in December, suddenly all pthread primitives which wait for restart signals are cancellation points. Fix below, tested on all the usual arches. 2003-04-01 Jakub Jelinek linuxthreads/ * pthread.c (__pthread_wait_for_restart_signal): Use __pthread_sigsuspend instead of sigsuspend. * internals.h (__pthread_sigsuspend): New prototype. * Makefile (libpthread-routines): Add pt-sigsuspend. (tests): Add tst-cancel7. * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file. * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file. * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file. * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file. * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file. * tst-cancel7.c: New test. libc/ * sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: Use the IA-64 version. --- libc/linuxthreads/Makefile.jj 2003-02-22 17:53:57.000000000 -0500 +++ libc/linuxthreads/Makefile 2003-04-01 05:27:16.000000000 -0500 @@ -36,8 +36,8 @@ extra-libs-others := $(extra-libs) install-lib-ldscripts := libpthread.so libpthread-routines := attr cancel condvar join manager mutex ptfork \ - ptlongjmp pthread signals specific errno lockfile \ - semaphore spinlock rwlock pt-machine \ + ptlongjmp pthread pt-sigsuspend signals specific errno \ + lockfile semaphore spinlock rwlock pt-machine \ oldsemaphore events getcpuclockid pspinlock barrier \ ptclock_gettime ptclock_settime sighandler \ pthandles libc-tls-loc pt-allocrtsig \ @@ -89,7 +89,7 @@ tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15 ex16 \ ex17 ex18 tst-cancel tst-context bug-sleep \ tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel5 \ - tst-cancel6 tst-popen tst-popen2 + tst-cancel6 tst-cancel7 tst-popen tst-popen2 test-srcs = tst-signal # These tests are linked with libc before libpthread tests-reverse += tst-cancel5 --- libc/linuxthreads/tst-cancel7.c.jj 2003-04-01 06:07:27.000000000 -0500 +++ libc/linuxthreads/tst-cancel7.c 2003-04-01 06:41:34.000000000 -0500 @@ -0,0 +1,110 @@ +/* Copyright (C) 2003 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +pthread_barrier_t b; +int value = 0; + +static void * +tf (void *arg) +{ + int r = pthread_barrier_wait (&b); + if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __FUNCTION__); + exit (1); + } + + pthread_mutex_lock (&lock); + ++value; + pthread_testcancel (); + ++value; + pthread_mutex_unlock (&lock); + return NULL; +} + + +static int +do_test (void) +{ + pthread_mutex_lock (&lock); + + if (pthread_barrier_init (&b, NULL, 2) != 0) + { + puts ("barrier init failed"); + return 1; + } + + pthread_t th; + if (pthread_create (&th, NULL, tf, NULL) != 0) + { + puts ("pthread_create failed"); + return 1; + } + + int r = pthread_barrier_wait (&b); + if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD) + { + printf ("%s: barrier_wait failed\n", __FUNCTION__); + exit (1); + } + + if (pthread_cancel (th) != 0) + { + puts ("pthread_cancel failed"); + return 1; + } + + pthread_mutex_unlock (&lock); + + void *status; + if (pthread_join (th, &status) != 0) + { + puts ("join failed"); + return 1; + } + + if (status != PTHREAD_CANCELED) + { + puts ("thread not canceled"); + return 1; + } + + if (value == 0) + { + puts ("thread cancelled in the pthread_mutex_lock call"); + return 1; + } + + if (value != 1) + { + puts ("thread not cancelled in pthread_testcancel call"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" --- libc/linuxthreads/pthread.c.jj 2003-03-06 12:26:17.000000000 -0500 +++ libc/linuxthreads/pthread.c 2003-04-01 04:56:53.000000000 -0500 @@ -1144,7 +1144,8 @@ void __pthread_wait_for_restart_signal(p sigdelset(&mask, __pthread_sig_restart); /* Unblock the restart signal */ THREAD_SETMEM(self, p_signal, 0); do { - sigsuspend(&mask); /* Wait for signal */ + __pthread_sigsuspend(&mask); /* Wait for signal. Must not be a + cancellation point. */ } while (THREAD_GETMEM(self, p_signal) !=__pthread_sig_restart); READ_MEMORY_BARRIER(); /* See comment in __pthread_restart_new */ --- libc/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c.jj 2003-04-01 05:09:33.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c 2003-04-01 05:12:37.000000000 -0500 @@ -0,0 +1,32 @@ +/* Copyright (C) 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +#include +#include +#include + +void +__pthread_sigsuspend (const sigset_t *set) +{ + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8); +} --- libc/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c.jj 2003-04-01 05:16:33.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c 2003-04-01 05:16:48.000000000 -0500 @@ -0,0 +1 @@ +#include "../../ia64/pt-sigsuspend.c" --- libc/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c.jj 2003-04-01 05:16:33.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c 2003-04-01 05:16:48.000000000 -0500 @@ -0,0 +1 @@ +#include "../../ia64/pt-sigsuspend.c" --- libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c.jj 2003-04-01 05:16:33.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c 2003-04-01 05:16:29.000000000 -0500 @@ -0,0 +1 @@ +#include "../ia64/pt-sigsuspend.c" --- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S.jj 2003-04-01 05:05:55.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S 2003-04-01 05:08:30.000000000 -0500 @@ -0,0 +1,27 @@ +/* Copyright (C) 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#undef PSEUDO_PREPARE_ARGS +#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0); + + .hidden __pthread_sigsuspend +PSEUDO_NOERRNO(__pthread_sigsuspend, sigsuspend, 1) + ret +PSEUDO_END_NOERRNO(__pthread_sigsuspend) --- libc/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c.jj 2003-04-01 04:48:47.000000000 -0500 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2003-04-01 05:13:26.000000000 -0500 @@ -0,0 +1,55 @@ +/* Copyright (C) 1996-2000, 2002, 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +#include +#include +#include + +#include "kernel-features.h" + +void +__pthread_sigsuspend (const sigset_t *set) +{ + INTERNAL_SYSCALL_DECL (err); +#if !__ASSUME_REALTIME_SIGNALS + static int __pthread_missing_rt_sigs; + +# ifdef __NR_rt_sigsuspend + /* First try the RT signals. */ + if (!__pthread_missing_rt_sigs) + { + /* XXX The size argument hopefully will have to be changed to the + real size of the user-level sigset_t. */ + int r; + r = INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8); + if (INTERNAL_SYSCALL_ERRNO (r, err) != ENOSYS) + return; + + __pthread_missing_rt_sigs = 1; + } +# endif + + INTERNAL_SYSCALL (sigsuspend, err, 3, 0, 0, set->__val[0]); +#else + INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8); +#endif +} --- libc/linuxthreads/internals.h.jj 2003-01-07 10:57:55.000000000 -0500 +++ libc/linuxthreads/internals.h 2003-04-01 05:23:33.000000000 -0500 @@ -377,6 +377,8 @@ extern int __pthread_timedsuspend_new(pt extern void __pthread_wait_for_restart_signal(pthread_descr self); +extern void __pthread_sigsuspend (const sigset_t *mask) attribute_hidden; + extern int __pthread_yield (void); extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c.jj 2002-12-15 18:21:00.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c 2003-04-01 05:21:01.000000000 -0500 @@ -1,41 +1 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2002 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include -#include - -#include -#include -#include - -extern int __syscall_rt_sigsuspend (const sigset_t *__unbounded, size_t); - -/* Change the set of blocked signals to SET, - wait until a signal arrives, and restore the set of blocked signals. */ -int -__sigsuspend (set) - const sigset_t *set; -{ - /* XXX The size argument hopefully will have to be changed to the - real size of the user-level sigset_t. */ - return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (set), _NSIG / 8); -} -libc_hidden_def (__sigsuspend) -weak_alias (__sigsuspend, sigsuspend) -strong_alias (__sigsuspend, __libc_sigsuspend) +#include "../../ia64/sigsuspend.c" Jakub From jakub@redhat.com Tue Apr 1 18:51:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 01 Apr 2003 18:51:00 -0000 Subject: [PATCH] Fix IA-64 bits/siginfo.h typo Message-ID: <20030401185137.GK16629@sunsite.ms.mff.cuni.cz> Hi! 2003-04-01 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (sigevent_t): Fix a typo. --- libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h.jj 2003-04-01 04:21:00.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h 2003-04-01 13:49:19.000000000 -0500 @@ -297,7 +297,7 @@ enum # define __SIGEV_MAX_SIZE 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) - struct sigevent +typedef struct sigevent { sigval_t sigev_value; int sigev_signo; Jakub From drepper@redhat.com Tue Apr 1 19:03:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 01 Apr 2003 19:03:00 -0000 Subject: [PATCH] Fix IA-64 bits/siginfo.h typo In-Reply-To: <20030401185137.GK16629@sunsite.ms.mff.cuni.cz> References: <20030401185137.GK16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E89E24B.7050405@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > 2003-04-01 Jakub Jelinek > > * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (sigevent_t): Fix a > typo. Applied, thanks. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+ieJL2ijCOnn/RHQRAm/FAJ4yV5UT0bZerXQCqrS6qeEXxqRR+gCgxM3/ xYYl9hmN68RtXRrbUCuFrpQ= =AuGw -----END PGP SIGNATURE----- From jakub@redhat.com Tue Apr 1 19:45:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 01 Apr 2003 19:45:00 -0000 Subject: [PATCH] Fix IA-64 tls-macros.h Message-ID: <20030401194503.GL16629@sunsite.ms.mff.cuni.cz> Hi! We have to tell gc those 3 asm's use gp, because otherwise when optimizing there might be a gp value from last called function in gp instead of current function's got pointer. 2003-04-01 Jakub Jelinek * elf/tls-macros.h [__ia64__] (TLS_IE, TLS_LD, TLS_GD): Add gp register as input to asm. --- libc/elf/tls-macros.h.jj 2003-03-02 06:41:54.000000000 -0500 +++ libc/elf/tls-macros.h 2003-04-01 14:31:13.000000000 -0500 @@ -316,13 +316,14 @@ register void *__gp __asm__("$29"); # define TLS_IE(x) \ ({ void *__l; \ + register long __gp asm ("gp"); \ asm (";;\n\t" \ "addl r16=@ltoff(@tprel(" #x ")),gp\n\t" \ ";;\n\t" \ "ld8 r17=[r16]\n\t" \ ";;\n\t" \ "add %0=r13,r17\n\t" \ - : "=r" (__l) : : "r16", "r17" ); __l; }) + : "=r" (__l) : "r" (__gp) : "r16", "r17" ); __l; }) # define __TLS_CALL_CLOBBERS \ "r2", "r3", "r8", "r9", "r10", "r11", "r14", "r15", "r16", "r17", \ @@ -335,6 +336,7 @@ register void *__gp __asm__("$29"); # define TLS_LD(x) \ ({ void *__l; \ + register long __gp asm ("gp"); \ asm (";;\n\t" \ "mov loc0=gp\n\t" \ "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \ @@ -345,11 +347,12 @@ register void *__gp __asm__("$29"); ";;\n\t" \ "mov gp=loc0\n\t" \ "mov %0=r8\n\t" \ - : "=r" (__l) : : "loc0", __TLS_CALL_CLOBBERS); \ + : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \ __l; }) # define TLS_GD(x) \ ({ void *__l; \ + register long __gp asm ("gp"); \ asm (";;\n\t" \ "mov loc0=gp\n\t" \ "addl r16=@ltoff(@dtpmod(" #x ")),gp\n\t" \ @@ -361,7 +364,7 @@ register void *__gp __asm__("$29"); ";;\n\t" \ "mov gp=loc0\n\t" \ "mov %0=r8\n\t" \ - : "=r" (__l) : : "loc0", __TLS_CALL_CLOBBERS); \ + : "=r" (__l) : "r" (__gp) : "loc0", __TLS_CALL_CLOBBERS); \ __l; }) #elif defined __sparc__ && !defined __arch64__ Jakub From roland@redhat.com Tue Apr 1 19:50:00 2003 From: roland@redhat.com (Roland McGrath) Date: Tue, 01 Apr 2003 19:50:00 -0000 Subject: [PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads In-Reply-To: Jakub Jelinek's message of Tuesday, 1 April 2003 17:19:26 +0200 <20030401151926.GI16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304011950.h31JoPZ23056@magilla.sf.frob.com> Why __pthread_sigsuspend instead of just using INTERNAL_SYSCALL directly? kernel-features.h can define something about rt_sigsuspend vs sigsuspend for each machine. From drepper@redhat.com Tue Apr 1 20:11:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 01 Apr 2003 20:11:00 -0000 Subject: [PATCH] Fix IA-64 tls-macros.h In-Reply-To: <20030401194503.GL16629@sunsite.ms.mff.cuni.cz> References: <20030401194503.GL16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E89F264.8020408@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > We have to tell gc those 3 asm's use gp, because otherwise when optimizing > there might be a gp value from last called function in gp instead of current > function's got pointer. Since I assume you've tested this I applied the patch. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+ifJk2ijCOnn/RHQRAqX6AKCiimyykkginYbKTZQk6qxzVfbazgCfY0LV r0rR3O/efQkh/BYSOas2DUY= =ZZdq -----END PGP SIGNATURE----- From jakub@redhat.com Tue Apr 1 20:17:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 01 Apr 2003 20:17:00 -0000 Subject: [PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads In-Reply-To: <200304011950.h31JoPZ23056@magilla.sf.frob.com> References: <20030401151926.GI16629@sunsite.ms.mff.cuni.cz> <200304011950.h31JoPZ23056@magilla.sf.frob.com> Message-ID: <20030401201745.GM16629@sunsite.ms.mff.cuni.cz> On Tue, Apr 01, 2003 at 11:50:25AM -0800, Roland McGrath wrote: > Why __pthread_sigsuspend instead of just using INTERNAL_SYSCALL directly? > kernel-features.h can define something about rt_sigsuspend vs sigsuspend > for each machine. It differs between arches. On most arches it is INTERNAL_SYSCALL (rt_sigsuspend, err, 2, set, _NSIG / 8); on some for compatibility INTERNAL_SYSCALL (sigsuspend, err, 3, 0, 0, set->__val[0]); (with possible runtime choice) but on Alpha it is INTERNAL_SYSCALL (sigsuspend, err, 1, set->__val[0]); (well, looks like the same on sparc32 for pre-rtsig kernels, apparently nobody is running < 2.2.x kernels on sparc any more). I think best would be a special header in linuxthreads/sysdeps/unix/sysv/linux/* and inline the call to avoid the call/return overhead. Jakub From drepper@redhat.com Tue Apr 1 20:46:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 01 Apr 2003 20:46:00 -0000 Subject: [PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads In-Reply-To: <20030401201745.GM16629@sunsite.ms.mff.cuni.cz> References: <20030401151926.GI16629@sunsite.ms.mff.cuni.cz> <200304011950.h31JoPZ23056@magilla.sf.frob.com> <20030401201745.GM16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E89FA7B.6090506@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > It differs between arches. It's not worth adding much cmoplexity. I think the original patch is fine. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+ifp72ijCOnn/RHQRAreBAJkBsME5UcHaG3YjFA41Vvi3t8PV5ACcDsp4 LcBHA+NKhtrhK2cjZPQ/vs4= =iUfj -----END PGP SIGNATURE----- From roland@redhat.com Wed Apr 2 00:11:00 2003 From: roland@redhat.com (Roland McGrath) Date: Wed, 02 Apr 2003 00:11:00 -0000 Subject: [PATCH] Avoid cancellation point in pthread_mutex_lock etc. in linuxthreads In-Reply-To: Jakub Jelinek's message of Tuesday, 1 April 2003 17:19:26 +0200 <20030401151926.GI16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304020011.h320B9O04232@magilla.sf.frob.com> > linuxthreads call sigsuspend from pthread_mutex_lock etc., so when sigsuspend > was made cancellation point in December, suddenly all pthread primitives > which wait for restart signals are cancellation points. > Fix below, tested on all the usual arches. I put these in. Thanks, Roland From jakub@redhat.com Wed Apr 2 08:15:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 02 Apr 2003 08:15:00 -0000 Subject: [PATCH] Linuxthreads pthread_atfork fix Message-ID: <20030402081529.GN16629@sunsite.ms.mff.cuni.cz> Hi! LT needs to follow NPTL lead here. 2003-04-02 Jakub Jelinek * Makefile (libpthread-routines): Add pthread_atfork. (libpthread-static-only-routines): Add pthread_atfork. --- libc/linuxthreads/Makefile.jj 2003-04-02 03:09:39.000000000 -0500 +++ libc/linuxthreads/Makefile 2003-04-02 03:11:43.000000000 -0500 @@ -47,11 +47,12 @@ libpthread-routines := attr cancel condv ptw-lseek64 ptw-llseek ptw-msync ptw-nanosleep \ ptw-open ptw-open64 ptw-pause ptw-pread ptw-pread64 \ ptw-pwrite ptw-pwrite64 ptw-tcdrain ptw-wait \ - ptw-waitpid pt-system old_pthread_atfork + ptw-waitpid pt-system old_pthread_atfork pthread_atfork # Don't generate deps for calls with no sources. See sysdeps/unix/Makefile. omit-deps = $(unix-syscalls:%=ptw-%) libpthread-shared-only-routines = pt-allocrtsig +libpthread-static-only-routines = pthread_atfork libpthread-nonshared = pthread_atfork Jakub From roland@redhat.com Wed Apr 2 09:20:00 2003 From: roland@redhat.com (Roland McGrath) Date: Wed, 02 Apr 2003 09:20:00 -0000 Subject: [PATCH] Linuxthreads pthread_atfork fix In-Reply-To: Jakub Jelinek's message of Wednesday, 2 April 2003 10:15:29 +0200 <20030402081529.GN16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304020920.h329KCY00335@magilla.sf.frob.com> > LT needs to follow NPTL lead here. > > 2003-04-02 Jakub Jelinek > > * Makefile (libpthread-routines): Add pthread_atfork. > (libpthread-static-only-routines): Add pthread_atfork. I put this in. Thanks, Roland From jakub@redhat.com Thu Apr 3 11:02:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 03 Apr 2003 11:02:00 -0000 Subject: [PATCH] Fix get_proc_path Message-ID: <20030403110213.GQ16629@sunsite.ms.mff.cuni.cz> Hi! atomic_compare_and_exchange_bool_acq returns non-zero if it failed to exchange. This fixes getconf _NPROCESSORS_ONLN on my box. 2003-04-03 Jakub Jelinek * sysdeps/unix/sysv/linux/getsysstats.c (get_proc_path): Reverse test for atomic_compare_and_exchange_bool_acq failure. --- libc/sysdeps/unix/sysv/linux/getsysstats.c.jj 2003-03-21 05:17:37.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/getsysstats.c 2003-04-03 05:31:09.000000000 -0500 @@ -85,7 +85,7 @@ get_proc_path (char *buffer, size_t bufs /* Now store the copied value. But do it atomically. */ assert (sizeof (long int) == sizeof (void *__unbounded)); - if (! atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL)) + if (atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL)) /* Replacing the value failed. This means another thread was faster and we don't need the copy anymore. */ free (copy_result); Jakub From jakub@redhat.com Thu Apr 3 14:03:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 03 Apr 2003 14:03:00 -0000 Subject: [PATCH] Fix linuxthreads when spawned from programs using NPTL Message-ID: <20030403140323.GR16629@sunsite.ms.mff.cuni.cz> Hi! If a linuxthreads programs is spawned from a threaded NPTL program (such as gnome-terminal, konsole etc.), bad things happen as since 2003-03-25 NPTL blocks __SIGRTMIN+1, so all LT threads but the manager (which does SIG_SETMASK at the very end) never receive __pthread_sig_cancel. 2003-04-03 Jakub Jelinek * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel in case the parent blocked it. --- linuxthreads/pthread.c.jj 2003-04-03 07:16:43.000000000 -0500 +++ linuxthreads/pthread.c 2003-04-03 08:38:29.000000000 -0500 @@ -550,6 +550,10 @@ static void pthread_initialize(void) sigemptyset(&mask); sigaddset(&mask, __pthread_sig_restart); sigprocmask(SIG_BLOCK, &mask, NULL); + /* And unblock __pthread_sig_cancel if it has been blocked. */ + sigdelset(&mask, __pthread_sig_restart); + sigaddset(&mask, __pthread_sig_cancel); + sigprocmask(SIG_UNBLOCK, &mask, NULL); /* Register an exit function to kill all other threads. */ /* Do it early so that user-registered atexit functions are called before pthread_*exit_process. */ Jakub From drepper@redhat.com Thu Apr 3 18:48:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 03 Apr 2003 18:48:00 -0000 Subject: [PATCH] Fix get_proc_path In-Reply-To: <20030403110213.GQ16629@sunsite.ms.mff.cuni.cz> References: <20030403110213.GQ16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E8C81FE.9090102@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > atomic_compare_and_exchange_bool_acq returns non-zero if it failed to > exchange. This fixes getconf _NPROCESSORS_ONLN on my box. Applied. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+jIH+2ijCOnn/RHQRAlpjAJ9bGbNMX4g6Fakt1QsanGuCk7c0hACfbPlA F6uqyozhNxfE7e5DLrEe3hk= =wkbC -----END PGP SIGNATURE----- From drepper@redhat.com Thu Apr 3 18:55:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 03 Apr 2003 18:55:00 -0000 Subject: [PATCH] Fix linuxthreads when spawned from programs using NPTL In-Reply-To: <20030403140323.GR16629@sunsite.ms.mff.cuni.cz> References: <20030403140323.GR16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E8C8384.2090101@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > If a linuxthreads programs is spawned from a threaded NPTL program > (such as gnome-terminal, konsole etc.), bad things happen as > since 2003-03-25 NPTL blocks This problem existed forever, why nobody noticed it is a big question. Applied. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+jIOE2ijCOnn/RHQRAjW5AKCWz/DtYzfdS/KeCCUGq5E4VpI9oQCeOKdv SDKU+EoUvc3BpysEimKGpW8= =x1+z -----END PGP SIGNATURE----- From roland@redhat.com Thu Apr 3 20:16:00 2003 From: roland@redhat.com (Roland McGrath) Date: Thu, 03 Apr 2003 20:16:00 -0000 Subject: [PATCH] Fix linuxthreads when spawned from programs using NPTL In-Reply-To: Ulrich Drepper's message of Thursday, 3 April 2003 10:55:00 -0800 <3E8C8384.2090101@redhat.com> Message-ID: <200304032016.h33KGbS29134@magilla.sf.frob.com> It seems to me that NPTL should not leave signals blocked when it execs. From jakub@redhat.com Sat Apr 5 00:09:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Sat, 05 Apr 2003 00:09:00 -0000 Subject: [PATCH] Fix __register_printf_function Message-ID: <20030405000927.GT16629@sunsite.ms.mff.cuni.cz> Hi! Using uninited memory is bad idea, sorry. 2003-04-05 Jakub Jelinek * stdio-common/reg-printf.c (__register_printf_function): Calloc instead of malloc __printf_arginfo_table and __printf_function_table. Reported by John Reiser . --- libc/stdio-common/reg-printf.c.jj 2002-11-05 17:12:55.000000000 -0500 +++ libc/stdio-common/reg-printf.c 2003-04-04 19:04:45.000000000 -0500 @@ -46,7 +46,7 @@ __register_printf_function (spec, conver if (__printf_function_table == NULL) { __printf_arginfo_table = (printf_arginfo_function **) - malloc ((UCHAR_MAX + 1) * sizeof (void *) * 2); + calloc ((UCHAR_MAX + 1), sizeof (void *) * 2); if (__printf_arginfo_table == NULL) return -1; __printf_function_table = (printf_function **) Jakub From roland@redhat.com Sat Apr 5 00:34:00 2003 From: roland@redhat.com (Roland McGrath) Date: Sat, 05 Apr 2003 00:34:00 -0000 Subject: [PATCH] Fix __register_printf_function In-Reply-To: Jakub Jelinek's message of Saturday, 5 April 2003 02:09:27 +0200 <20030405000927.GT16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304050034.h350YHh05733@magilla.sf.frob.com> > 2003-04-05 Jakub Jelinek > > * stdio-common/reg-printf.c (__register_printf_function): Calloc > instead of malloc __printf_arginfo_table and __printf_function_table. > Reported by John Reiser . I put this in. Thanks, Roland From drepper@redhat.com Sat Apr 5 10:33:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 05 Apr 2003 10:33:00 -0000 Subject: current state of the tree Message-ID: <3E8EB0F2.70406@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The current tree fails to complete the tests for me in the moment. Specifically, intl/tst-gettext. I have no idea why. None of the changes I made should have anything to do with it. I'll look at it tomorrow unless somebody betas me to it. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+jrD42ijCOnn/RHQRAgjBAJ4kWJNOTGptF/8i4O7s7yGxFfLYbACeKZ0/ UPdXx42RVCfAy6PI+lzy5rI= =Ojo9 -----END PGP SIGNATURE----- From aj@suse.de Sat Apr 5 13:57:00 2003 From: aj@suse.de (Andreas Jaeger) Date: Sat, 05 Apr 2003 13:57:00 -0000 Subject: current state of the tree In-Reply-To: <3E8EB0F2.70406@redhat.com> (Ulrich Drepper's message of "Sat, 05 Apr 2003 02:33:22 -0800") References: <3E8EB0F2.70406@redhat.com> Message-ID: Ulrich Drepper writes: > The current tree fails to complete the tests for me in the moment. > Specifically, intl/tst-gettext. I have no idea why. None of the > changes I made should have anything to do with it. I'll look at it > tomorrow unless somebody betas me to it. The sources just build fine on i686-linux-gnu for me (with a GCC 3.3 prerelease), Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From kkojima@rr.iij4u.or.jp Sun Apr 6 01:23:00 2003 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Sun, 06 Apr 2003 01:23:00 -0000 Subject: [PATCH] SH: bits/atomic.h Message-ID: <200304060123.h361Nii06929@r-rr.iij4u.or.jp> Hi, Here is a patch for sh atomicity macros. Sorry for the delay. If it's ok, please move the file sysdeps/sh/bits/atomic.h to sysdeps/unix/sysv/linux/sh/bits. I've added a comment for the software atomic sequence according to Roland's advice. Regards, kaz -- 2002-04-06 Kaz Kojima * sysdeps/sh/bits/atomic.h: Add comment. (__arch_compare_and_exchange_val_*_acq): Add parens around macro arguments. (atomic_bit_set, atomic_bit_test_set): Likewise. (atomic_exchange_and_add): Likewise. Don't evaluate value argument twice. (atomic_add, atomic_add_negative, atomic_add_zero): Likewise. --- ORIG/libc/sysdeps/sh/bits/atomic.h Sat Mar 29 10:37:20 2003 +++ LOCAL/libc/sysdeps/sh/bits/atomic.h Sun Apr 6 09:48:19 2003 @@ -44,9 +44,28 @@ typedef uintptr_t uatomicptr_t; typedef intmax_t atomic_max_t; typedef uintmax_t uatomic_max_t; +/* SH kernel has implemented a gUSA ("g" User Space Atomicity) support + for the user space atomicity. The atomicity macros use this scheme. + + Reference: + Niibe Yutaka, "gUSA: Simple and Efficient User Space Atomicity + Emulation with Little Kernel Modification", Linux Conference 2002, + Japan. http://lc.linux.or.jp/lc2002/papers/niibe0919h.pdf (in + Japanese). + + B.N. Bershad, D. Redell, and J. Ellis, "Fast Mutual Exclusion for + Uniprocessors", Proceedings of the Fifth Architectural Support for + Programming Languages and Operating Systems (ASPLOS), pp. 223-233, + October 1992. http://www.cs.washington.edu/homes/bershad/Papers/Rcs.ps + + SuperH ABI: + r15: -(size of atomic instruction sequence) < 0 + r0: end point + r1: saved stack pointer +*/ #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (*mem) __result; \ + ({ __typeof (*(mem)) __result; \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -63,7 +82,7 @@ typedef uintmax_t uatomic_max_t; __result; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __typeof (*mem) __result; \ + ({ __typeof (*(mem)) __result; \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -80,7 +99,7 @@ typedef uintmax_t uatomic_max_t; __result; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (*mem) __result; \ + ({ __typeof (*(mem)) __result; \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -105,9 +124,8 @@ typedef uintmax_t uatomic_max_t; (abort (), 0) #define atomic_exchange_and_add(mem, value) \ - ({ __typeof (*mem) __result; \ - __typeof (value) __value; \ - if (sizeof (*mem) == 1) \ + ({ __typeof (*(mem)) __result, __tmp, __value = (value); \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -117,9 +135,9 @@ typedef uintmax_t uatomic_max_t; add %0,%1\n\ mov.b %1,@%2\n\ 1: mov r1,r15"\ - : "=&r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -129,9 +147,9 @@ typedef uintmax_t uatomic_max_t; add %0,%1\n\ mov.w %1,@%2\n\ 1: mov r1,r15"\ - : "=&r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -141,23 +159,22 @@ typedef uintmax_t uatomic_max_t; add %0,%1\n\ mov.l %1,@%2\n\ 1: mov r1,r15"\ - : "=&r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "memory"); \ else \ { \ - __typeof (value) addval = (value); \ __typeof (mem) memp = (mem); \ do \ __result = *memp; \ while (__arch_compare_and_exchange_val_64_acq \ - (memp, __result + addval, __result) == __result); \ - (void) addval; \ + (memp, __result + __value, __result) == __result); \ + (void) __value; \ } \ __result; }) #define atomic_add(mem, value) \ - (void) ({ __typeof (value) __value; \ - if (sizeof (*mem) == 1) \ + (void) ({ __typeof (*(mem)) __tmp, __value = (value); \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -167,9 +184,9 @@ typedef uintmax_t uatomic_max_t; add r2,%0\n\ mov.b %0,@%1\n\ 1: mov r1,r15"\ - : "=&r" (__value) : "r" (mem), "0" (value) \ + : "=&r" (__tmp) : "r" (mem), "0" (__value) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -179,9 +196,9 @@ typedef uintmax_t uatomic_max_t; add r2,%0\n\ mov.w %0,@%1\n\ 1: mov r1,r15"\ - : "=&r" (__value) : "r" (mem), "0" (value) \ + : "=&r" (__tmp) : "r" (mem), "0" (__value) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -191,25 +208,24 @@ typedef uintmax_t uatomic_max_t; add r2,%0\n\ mov.l %0,@%1\n\ 1: mov r1,r15"\ - : "=&r" (__value) : "r" (mem), "0" (value) \ + : "=&r" (__tmp) : "r" (mem), "0" (__value) \ : "r0", "r1", "r2", "memory"); \ else \ { \ - __typeof (value) addval = (value); \ - __typeof (*mem) oldval; \ + __typeof (*(mem)) oldval; \ __typeof (mem) memp = (mem); \ do \ oldval = *memp; \ while (__arch_compare_and_exchange_val_64_acq \ - (memp, oldval + addval, oldval) == oldval); \ - (void) addval; \ + (memp, oldval + __value, oldval) == oldval); \ + (void) __value; \ } \ }) #define atomic_add_negative(mem, value) \ ({ unsigned char __result; \ - __typeof (value) __value; \ - if (sizeof (*mem) == 1) \ + __typeof (*(mem)) __tmp, __value = (value); \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -221,9 +237,9 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ shal %1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -235,9 +251,9 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ shal %1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -249,7 +265,7 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ shal %1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ else \ abort (); \ @@ -257,8 +273,8 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_zero(mem, value) \ ({ unsigned char __result; \ - __typeof (value) __value; \ - if (sizeof (*mem) == 1) \ + __typeof (*(mem)) __tmp, __value = (value); \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -270,9 +286,9 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ tst %1,%1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -284,9 +300,9 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ tst %1,%1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -298,7 +314,7 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15\n\ tst %1,%1\n\ movt %0"\ - : "=r" (__result), "=&r" (__value) : "r" (mem), "1" (value) \ + : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \ : "r0", "r1", "r2", "t", "memory"); \ else \ abort (); \ @@ -309,7 +325,7 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_set(mem, bit) \ (void) ({ unsigned int __mask = 1 << (bit); \ - if (sizeof (*mem) == 1) \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -321,7 +337,7 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15"\ : : "r" (mem), "r" (__mask) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -333,7 +349,7 @@ typedef uintmax_t uatomic_max_t; 1: mov r1,r15"\ : : "r" (mem), "r" (__mask) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -352,7 +368,7 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_test_set(mem, bit) \ ({ unsigned int __mask = 1 << (bit); \ unsigned int __result = __mask; \ - if (sizeof (*mem) == 1) \ + if (sizeof (*(mem)) == 1) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -367,7 +383,7 @@ typedef uintmax_t uatomic_max_t; : "=&r" (__result), "=&r" (__mask) \ : "r" (mem), "0" (__result), "1" (__mask) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 2) \ + else if (sizeof (*(mem)) == 2) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ @@ -382,7 +398,7 @@ typedef uintmax_t uatomic_max_t; : "=&r" (__result), "=&r" (__mask) \ : "r" (mem), "0" (__result), "1" (__mask) \ : "r0", "r1", "r2", "memory"); \ - else if (sizeof (*mem) == 4) \ + else if (sizeof (*(mem)) == 4) \ __asm __volatile ("\ .align 2\n\ mova 1f,r0\n\ From jakub@redhat.com Sun Apr 6 18:50:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 06 Apr 2003 18:50:00 -0000 Subject: [PATCH] Fix prelink support on IA-32 and ARM Message-ID: <20030406185024.GV16629@sunsite.ms.mff.cuni.cz> Hi! IA-32 and ARM define ELF_MACHINE_NO_RELA if RTLD_BOOTSTRAP (because ld.so on those arches really never needs to handle RELA relocations), so the 2003-03-14 change means that although prelinking could be used, ld.so would do the relocation processing on IA-32 and ARM anyway. 2003-04-06 Jakub Jelinek * elf/rtld.c: Revert 2003-03-14 change. * elf/dl-conflict.c (_dl_resolve_conflicts): Move #if ! ELF_MACHINE_NO_RELA conditional into the routine. --- libc/elf/rtld.c.jj 2003-03-20 05:58:48.000000000 -0500 +++ libc/elf/rtld.c 2003-04-06 14:45:41.000000000 -0400 @@ -1444,7 +1444,6 @@ cannot allocate TLS data structures for _dl_printf ("\nprelink checking: %s\n", prelinked ? "ok" : "failed"); } -#if ! ELF_MACHINE_NO_RELA /* We don't REL-only prelink. */ if (prelinked) { struct link_map *l; @@ -1477,7 +1476,6 @@ cannot allocate TLS data structures for _dl_sysdep_start_cleanup (); } else -#endif { /* Now we have all the objects loaded. Relocate them all except for the dynamic linker itself. We do this in reverse order so that copy --- libc/elf/dl-conflict.c.jj 2003-03-20 05:58:48.000000000 -0500 +++ libc/elf/dl-conflict.c 2003-04-06 14:46:12.000000000 -0400 @@ -28,11 +28,11 @@ #include #include "dynamic-link.h" -#if ! ELF_MACHINE_NO_RELA void _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict, ElfW(Rela) *conflictend) { +#if ! ELF_MACHINE_NO_RELA if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0)) _dl_printf ("\nconflict processing: %s\n", l->l_name[0] ? l->l_name : rtld_progname); @@ -64,5 +64,5 @@ _dl_resolve_conflicts (struct link_map * for (; conflict < conflictend; ++conflict) elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset); } -} #endif +} Jakub From roland@redhat.com Sun Apr 6 21:04:00 2003 From: roland@redhat.com (Roland McGrath) Date: Sun, 06 Apr 2003 21:04:00 -0000 Subject: [PATCH] SH: bits/atomic.h In-Reply-To: kaz Kojima's message of Sunday, 6 April 2003 10:29:05 +0900 <200304060123.h361Nii06929@r-rr.iij4u.or.jp> Message-ID: <200304062104.h36L4PJ00815@magilla.sf.frob.com> Thanks for the patch. I put the changes in and moved the file. Thanks, Roland From jakub@redhat.com Mon Apr 7 21:13:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 07 Apr 2003 21:13:00 -0000 Subject: [PATCH] Fix bug-regex4 Message-ID: <20030407211308.GX16629@sunsite.ms.mff.cuni.cz> Hi! If range and/or stop arguments to re_search_2 are too large, re_search_2 might search beyond end of buffer. 2003-04-07 Jakub Jelinek * posix/bug-regex4.c (main): Cap range and stop arguments to sum of size1 and size2 arguments. --- libc/posix/bug-regex4.c.jj 2002-07-29 09:14:54.000000000 -0400 +++ libc/posix/bug-regex4.c 2003-04-07 17:04:31.000000000 -0400 @@ -43,9 +43,9 @@ main (void) } else { - match[0] = re_search_2 (®ex, "xyabez", 6, "", 0, 1, 9, NULL, 10); + match[0] = re_search_2 (®ex, "xyabez", 6, "", 0, 1, 5, NULL, 6); match[1] = re_search_2 (®ex, NULL, 0, "abc", 3, 0, 3, NULL, 3); - match[2] = re_search_2 (®ex, "xya", 3, "bd", 2, 2, 6, NULL, 8); + match[2] = re_search_2 (®ex, "xya", 3, "bd", 2, 2, 3, NULL, 5); if (match[0] != 2 || match[1] != 0 || match[2] != 2) { printf ("re_search_2 returned %d,%d,%d, expected 2,0,2\n", Jakub From roland@redhat.com Tue Apr 8 01:23:00 2003 From: roland@redhat.com (Roland McGrath) Date: Tue, 08 Apr 2003 01:23:00 -0000 Subject: [PATCH] Fix bug-regex4 In-Reply-To: Jakub Jelinek's message of Monday, 7 April 2003 23:13:08 +0200 <20030407211308.GX16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304080123.h381NiC27342@magilla.sf.frob.com> > 2003-04-07 Jakub Jelinek > > * posix/bug-regex4.c (main): Cap range and stop arguments to > sum of size1 and size2 arguments. Thanks, I put this in. Roland From jakub@redhat.com Thu Apr 10 22:31:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 10 Apr 2003 22:31:00 -0000 Subject: [PATCH] Replace the ugly multilib libpthread hacks with something nicer Message-ID: <20030410223152.GD16629@sunsite.ms.mff.cuni.cz> Hi! glibc built on ppc64 using gcc -m64 where gcc defaults to -m32 if no -m64 is given results in all libpthread tests failed. Instead of hacking yet another ugly hack ala sparc or x86_64, the following patch hardlinks the crtfiles to where gcc will be actually looking for them. The search order of gcc when searching for these files is to go through gcc -print-search-dirs | sed -n 's/^libraries: =//p' in the first round appending the GCC resp. OS multidir names (depending on whether a particular directory is under toolchain or OS control) and if a file is not found there, it does another round without the multidirs appended. Say on the above mentioned ppc configuration, GCC multidir is 64 and OS multidir is ../lib64, one of the first directories it tries is $(objpfx)64, later on /usr/lib/../lib64 where it actually finds the crt file and stops, but if it would not find it there, a little bit later it would search $(objpfx) and if the file wouldn't be there it would continue to /usr/lib/. With this patch, the crt files are found immediately in a subdir of $(objpfx). NPTL would need similar change (although it only uses crti.o and not crtn.o). 2003-04-10 Jakub Jelinek * Makefile (multidir, crti-objs, crtn-objs): New variables. (generated-dirs): Add pathname component of multidir. (omit-deps, extra-objs): Include $(multidir)/crt? as well. ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well. ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o, $(objpfx)$(multidir)/crtn.o): New. * sysdeps/unix/sysv/linux/sparc/Makefile: Removed. * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so, before-compile, generated): Don't generate and use specs. ($(objpfx)specs): Remove. --- linuxthreads/sysdeps/unix/sysv/linux/sparc/Makefile.jj 2003-03-20 05:58:49.000000000 -0500 +++ linuxthreads/sysdeps/unix/sysv/linux/sparc/Makefile 2003-04-10 18:08:01.000000000 -0400 @@ -1,11 +0,0 @@ -ifeq ($(subdir),linuxthreads) -# gcc has /usr/lib{,64}/crti.o hardcoded in the specs file, because otherwise -# it would normally find {64,32}bit crt[in].o. -LDFLAGS-pthread.so += -specs=$(objpfx)specs -before-compile += $(objpfx)specs -generated += specs -$(objpfx)specs: - $(CC) $(CFLAGS) $(CPPFLAGS) -dumpspecs \ - | sed 's~\(/usr/lib\(\|64\)/\|^\|\([^/a-z]\)\)\(crt[in]\.o\)~\3'$(objpfx)'\4~g' > $@.new - mv -f $@.new $@ -endif --- linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile.jj 2003-02-22 17:53:59.000000000 -0500 +++ linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile 2003-04-10 18:08:33.000000000 -0400 @@ -1,12 +1,3 @@ ifeq ($(subdir),linuxthreads) CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions -fno-asynchronous-unwind-tables -# gcc -m64 has /usr/lib64/crti.o hardcoded in the specs file, because otherwise -# it would normally find 32bit crti.o. -LDFLAGS-pthread.so += -specs=$(objpfx)specs -before-compile += $(objpfx)specs -generated += specs -$(objpfx)specs: - $(CC) $(CFLAGS) $(CPPFLAGS) -dumpspecs \ - | sed 's,\(/usr/lib\(\|64\)/\|^\|\([^/a-z]\)\)\(crt[in]\.o\),\3./\4,g' > $@.new - mv -f $@.new $@ endif --- linuxthreads/Makefile.jj 2003-04-03 05:27:37.000000000 -0500 +++ linuxthreads/Makefile 2003-04-10 18:10:34.000000000 -0400 @@ -79,7 +79,16 @@ $(objpfx)libpthread_nonshared.a: $(addpr ifeq ($(build-shared),yes) -extra-objs += crti.o crtn.o +multidir := $(shell $(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory) +crti-objs := crti.o +crtn-objs := crtn.o +ifneq ($(multidir),.) +generated-dirs := $(firstword $(subst /, , $(multidir))) +crti-objs += $(multidir)/crti.o +crtn-objs += $(multidir)/crtn.o +omit-deps += $(multidir)/crti $(multidir)/crtn +endif +extra-objs += $(crti-objs) $(crtn-objs) omit-deps += crti crtn CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions @@ -132,9 +141,9 @@ $(inst_libdir)/libpthread_nonshared.a: $ extra-B-pthread.so = -B$(common-objpfx)linuxthreads/ -$(objpfx)libpthread.so: $(objpfx)crti.o $(objpfx)crtn.o -$(objpfx)libpthread.so: +preinit += $(objpfx)crti.o -$(objpfx)libpthread.so: +postinit += $(objpfx)crtn.o +$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs)) +$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs)) +$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs)) znodelete-yes = -DHAVE_Z_NODELETE CFLAGS-mutex.c += -D__NO_WEAK_PTHREAD_ALIASES @@ -249,6 +258,17 @@ $(objpfx)crti.o: $(objpfx)crti.S $(objpf $(objpfx)crtn.o: $(objpfx)crtn.S $(objpfx)defs.h $(compile.S) -g0 $(ASFLAGS-.os) -o $@ +ifneq ($(multidir),.) +$(objpfx)$(multidir): + @mkdir -p $(objpfx)$(multidir) + +$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir) + ln -f $< $@ + +$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir) + ln -f $< $@ +endif + generated += crti.S crtn.S defs.h pt-initfini.s endif Jakub From schwidefsky@de.ibm.com Fri Apr 11 15:46:00 2003 From: schwidefsky@de.ibm.com (Martin Schwidefsky) Date: Fri, 11 Apr 2003 15:46:00 -0000 Subject: [PATCH] s390* pthread_spin_unlock. Message-ID: <200304111745.37114.schwidefsky@de.ibm.com> Hi, this is one of those "how could this ever work" bugs. The pthread_spin_lock primitive in linuxthread for s390* is broken. The following patch fixes it. blue skies, Martin. 2003-04-11 Martin Schwidefsky * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints. diff -urN libc/linuxthreads/sysdeps/s390/pspinlock.c libc-s390/linuxthreads/sysdeps/s390/pspinlock.c --- libc/linuxthreads/sysdeps/s390/pspinlock.c Fri Apr 11 17:34:17 2003 +++ libc-s390/linuxthreads/sysdeps/s390/pspinlock.c Fri Apr 11 17:33:22 2003 @@ -64,7 +64,7 @@ { asm volatile(" xc 0(4,%0),0(%0)\n" " bcr 15,0" - : "=a" (lock) ); + : : "a" (lock) : "memory" ); return 0; } weak_alias (__pthread_spin_unlock, pthread_spin_unlock) From jakub@redhat.com Fri Apr 11 18:01:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 11 Apr 2003 18:01:00 -0000 Subject: [PATCH] Fix string/tester.c typo Message-ID: <20030411180131.GE16629@sunsite.ms.mff.cuni.cz> Hi! The loop is otherwise pointless... 2003-04-11 Jakub Jelinek * string/tester.c (test_strcmp): Fix a typo. --- libc/string/tester.c.jj 2003-01-14 10:02:34.000000000 -0500 +++ libc/string/tester.c 2003-04-11 14:00:11.000000000 -0400 @@ -89,8 +89,8 @@ test_strcmp (void) int k; for (k = 0; k < 0x3f; k++) { - buf1[j] = '0' ^ (k & 4); - buf2[j] = '4' ^ (k & 4); + buf1[k] = '0' ^ (k & 4); + buf2[k] = '4' ^ (k & 4); } buf1[i] = buf1[0x3f] = 0; buf2[j] = buf2[0x3f] = 0; Jakub From jakub@redhat.com Fri Apr 11 18:06:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 11 Apr 2003 18:06:00 -0000 Subject: [PATCH] Fix ppc64 test-fenv Message-ID: <20030411180652.GF16629@sunsite.ms.mff.cuni.cz> Hi! Unless ppc64 glibc is built with --enable-kernel=2.4.21 or higher (without this switch 2.4.19 is assumed), it will fail test-fenv no matter whatever kernel it is running on. The following patch fixes it. 2003-04-11 Jakub Jelinek * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c (__fe_nomask_env): Try prctl even if __ASSUME_NEW_PRCTL_SYSCALL is not defined, but the prctl constants are. --- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c.jj 2003-03-06 12:26:24.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c 2003-04-11 10:18:44.000000000 -0400 @@ -27,9 +27,15 @@ const fenv_t * __fe_nomask_env (void) { -#ifdef __ASSUME_NEW_PRCTL_SYSCALL +#if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE + int result; INTERNAL_SYSCALL_DECL (err); - INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); + result = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); +# ifndef __ASSUME_NEW_PRCTL_SYSCALL + if (INTERNAL_SYSCALL_ERROR_P (result, err) + && INTERNAL_SYSCALL_ERRNO (result, err) == EINVAL) + __set_errno (ENOSYS); +# endif #else __set_errno (ENOSYS); #endif Jakub From drepper@redhat.com Fri Apr 11 18:50:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 11 Apr 2003 18:50:00 -0000 Subject: [PATCH] Fix ppc64 test-fenv In-Reply-To: References: Message-ID: <3E970E5F.904@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steve Munroe wrote: > Actually a bad kernel patch (related to initialing the MSR FE0/1 bits > correctly) went in after sometime after the 2.4.19 Suse SLES 8 release and > was not fixed again until 2.4.21-pre4 (I think). That's irrelevant. What does the official kernel sources contain? - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+lw5k2ijCOnn/RHQRAp6UAKCvWrqxMb7WtMSzmS3FMo+9LgQS7ACeLnBh jcoDOGZqyKwlUntibB+FxIU= =ZUUl -----END PGP SIGNATURE----- From jakub@redhat.com Fri Apr 11 18:54:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 11 Apr 2003 18:54:00 -0000 Subject: [PATCH] Fix ppc64 test-fenv In-Reply-To: <3E970E5F.904@redhat.com> References: <3E970E5F.904@redhat.com> Message-ID: <20030411185452.GG16629@sunsite.ms.mff.cuni.cz> > Steve Munroe wrote: > > > Actually a bad kernel patch (related to initialing the MSR FE0/1 bits > > correctly) went in after sometime after the 2.4.19 Suse SLES 8 release and > > was not fixed again until 2.4.21-pre4 (I think). If the official kernel source contained a buggy prctl so that it is unsafe to try prctl on kernels between 2.4.19 and 2.4.21, then linux/configure.in needs to be changed for 2.4.21 the minimum required kernel version. Really, having glibc built without --enable-kernel switch just not work forever no matter what kernel it is running on is a bad idea. Jakub From sjmunroe@us.ibm.com Fri Apr 11 19:43:00 2003 From: sjmunroe@us.ibm.com (Steve Munroe) Date: Fri, 11 Apr 2003 19:43:00 -0000 Subject: [PATCH] Fix ppc64 test-fenv Message-ID: Jakub Jelinek writes > If the official kernel source contained a buggy prctl so that it is unsafe > to try prctl on kernels between 2.4.19 and 2.4.21, then linux/configure.in > needs to be changed for 2.4.21 the minimum required kernel version. > Really, having glibc built without --enable-kernel switch just not work > forever no matter what kernel it is running on is a bad idea. prctl is not buggy. It either supports the feature or not. Your patch is OK and should be integrated. It just does not correct the fundamental problem. The 2.4.20 kernel does not initialize FE0|1 correctly for new processes lwp's. This disables FPE raise, until/unless this state is explicitely changed later. The original fe_nomask.c hack (inherited from PPC32) to set FE0|1 was only partially reliable on uniprocessors and unreliable on SMPs. That is why we added the PR_SET_FPEXC feature. I feel that fe_nomask should either work correctly or return ENOSYS. Your patch prevents test-fenv from seeing a EINVAL. The fix (both correct initial state for FE0|1 and the PR_SET_FPEXC feature are in Marcelo's 2.4.21.pre tree and will be released with 2.4.21. From roland@redhat.com Fri Apr 11 22:06:00 2003 From: roland@redhat.com (Roland McGrath) Date: Fri, 11 Apr 2003 22:06:00 -0000 Subject: [PATCH] s390* pthread_spin_unlock. In-Reply-To: Martin Schwidefsky's message of Friday, 11 April 2003 17:45:37 +0200 <200304111745.37114.schwidefsky@de.ibm.com> Message-ID: <200304112206.h3BM6Kn15551@magilla.sf.frob.com> > Hi, > this is one of those "how could this ever work" bugs. The pthread_spin_lock > primitive in linuxthread for s390* is broken. The following patch fixes it. I put your fix in. Thanks, Roland From roland@redhat.com Fri Apr 11 22:07:00 2003 From: roland@redhat.com (Roland McGrath) Date: Fri, 11 Apr 2003 22:07:00 -0000 Subject: [PATCH] Fix string/tester.c typo In-Reply-To: Jakub Jelinek's message of Friday, 11 April 2003 20:01:31 +0200 <20030411180131.GE16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304112207.h3BM79F15582@magilla.sf.frob.com> > Hi! > > The loop is otherwise pointless... > > 2003-04-11 Jakub Jelinek > > * string/tester.c (test_strcmp): Fix a typo. Thanks, it's in. Roland From roland@redhat.com Fri Apr 11 22:09:00 2003 From: roland@redhat.com (Roland McGrath) Date: Fri, 11 Apr 2003 22:09:00 -0000 Subject: [PATCH] Fix ppc64 test-fenv In-Reply-To: Steve Munroe's message of Friday, 11 April 2003 14:43:34 -0500 Message-ID: <200304112209.h3BM9KL15612@magilla.sf.frob.com> I've put Jakub's change in. Thanks, Roland From roland@redhat.com Fri Apr 11 23:36:00 2003 From: roland@redhat.com (Roland McGrath) Date: Fri, 11 Apr 2003 23:36:00 -0000 Subject: [PATCH] Replace the ugly multilib libpthread hacks with something nicer In-Reply-To: Jakub Jelinek's message of Friday, 11 April 2003 00:31:52 +0200 <20030410223152.GD16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304112336.h3BNadw20444@magilla.sf.frob.com> I don't like using $(shell ...) when it can be avoided, since it runs that compiler command every time the makefile is read for reason. I put your change in after hacking it to cache the value in a file and run the command only once. Thanks, Roland From jakub@redhat.com Mon Apr 14 13:34:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 14 Apr 2003 13:34:00 -0000 Subject: [PATCH] LOCK -> LOCK_PREFIX Message-ID: <20030414133446.GK16629@sunsite.ms.mff.cuni.cz> Hi! I think it is a bad idea to use LOCK macro in headers. Other code in glibc, e.g. sysdeps/generic/setenv.c uses it for other things and if not anything it gives unnecessary warnings. Especially tls.h which is often included quite indirectly. 2003-04-14 Jakub Jelinek * sysdeps/i386/i486/bits/atomic.h: Rename LOCK to LOCK_PREFIX. * sysdeps/x86_64/bits/atomic.h: Likewise. nptl/ * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX. * sysdeps/i386/pthread_spin_lock.c: Likewise. * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already defined. --- libc/sysdeps/i386/i486/bits/atomic.h.jj 2003-03-22 18:32:36.000000000 -0500 +++ libc/sysdeps/i386/i486/bits/atomic.h 2003-04-14 07:23:30.000000000 -0400 @@ -46,32 +46,32 @@ typedef intmax_t atomic_max_t; typedef uintmax_t uatomic_max_t; -#ifndef LOCK +#ifndef LOCK_PREFIX # ifdef UP -# define LOCK /* nothing */ +# define LOCK_PREFIX /* nothing */ # else -# define LOCK "lock;" +# define LOCK_PREFIX "lock;" # endif #endif #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgb %b2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgb %b2, %1" \ : "=a" (ret), "=m" (*mem) \ : "q" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgw %w2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgw %w2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgl %2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) @@ -90,7 +90,7 @@ typedef uintmax_t uatomic_max_t; # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ __asm __volatile ("xchgl %2, %%ebx\n\t" \ - LOCK "cmpxchg8b %1\n\t" \ + LOCK_PREFIX "cmpxchg8b %1\n\t" \ "xchgl %2, %%ebx" \ : "=A" (ret), "=m" (*mem) \ : "DS" (((unsigned long long int) (newval)) \ @@ -103,11 +103,11 @@ typedef uintmax_t uatomic_max_t; # else # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchg8b %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchg8b %1" \ : "=A" (ret), "=m" (*mem) \ : "b" (((unsigned long long int) (newval)) \ & 0xffffffff), \ - "c" (((unsigned long long int) (newval)) >> 32), \ + "c" (((unsigned long long int) (newval)) >> 32), \ "m" (*mem), "a" (((unsigned long long int) (oldval)) \ & 0xffffffff), \ "d" (((unsigned long long int) (oldval)) >> 32)); \ @@ -143,15 +143,15 @@ typedef uintmax_t uatomic_max_t; ({ __typeof (*mem) result; \ __typeof (value) addval = (value); \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "xaddb %b0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddb %b0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (addval), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "xaddw %w0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddw %w0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (addval), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "xaddl %0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddl %0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (addval), "m" (*mem)); \ else \ @@ -172,15 +172,15 @@ typedef uintmax_t uatomic_max_t; else if (__builtin_constant_p (value) && (value) == 1) \ atomic_decrement (mem); \ else if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b1, %0" \ + __asm __volatile (LOCK_PREFIX "addb %b1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w1, %0" \ + __asm __volatile (LOCK_PREFIX "addw %w1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %1, %0" \ + __asm __volatile (LOCK_PREFIX "addl %1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else \ @@ -199,15 +199,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_negative(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addb %b2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "iq" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addw %w2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addl %2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ @@ -218,15 +218,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_zero(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addb %b2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addw %w2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addl %2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ @@ -236,15 +236,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "incb %b0" \ + __asm __volatile (LOCK_PREFIX "incb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "incw %w0" \ + __asm __volatile (LOCK_PREFIX "incw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "incl %0" \ + __asm __volatile (LOCK_PREFIX "incl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ @@ -262,15 +262,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment_and_test(mem) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "incb %0; sete %b1" \ + __asm __volatile (LOCK_PREFIX "incb %0; sete %b1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "incw %0; sete %w1" \ + __asm __volatile (LOCK_PREFIX "incw %0; sete %w1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "incl %0; sete %1" \ + __asm __volatile (LOCK_PREFIX "incl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -280,15 +280,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "decb %b0" \ + __asm __volatile (LOCK_PREFIX "decb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "decw %w0" \ + __asm __volatile (LOCK_PREFIX "decw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "decl %0" \ + __asm __volatile (LOCK_PREFIX "decl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ @@ -306,15 +306,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement_and_test(mem) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "decb %b0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decb %b0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "decw %w0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decw %w0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "decl %0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -324,15 +324,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_set(mem, bit) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "orb %b2, %0" \ + __asm __volatile (LOCK_PREFIX "orb %b2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1 << (bit))); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "orw %w2, %0" \ + __asm __volatile (LOCK_PREFIX "orw %w2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1 << (bit))); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "orl %2, %0" \ + __asm __volatile (LOCK_PREFIX "orl %2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1 << (bit))); \ else \ @@ -343,15 +343,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_test_set(mem, bit) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "btsb %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsb %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "btsw %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsw %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "btsl %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsl %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else \ --- libc/sysdeps/x86_64/bits/atomic.h.jj 2003-03-26 11:50:40.000000000 -0500 +++ libc/sysdeps/x86_64/bits/atomic.h 2003-04-14 07:26:02.000000000 -0400 @@ -46,39 +46,39 @@ typedef intmax_t atomic_max_t; typedef uintmax_t uatomic_max_t; -#ifndef LOCK +#ifndef LOCK_PREFIX # ifdef UP -# define LOCK /* nothing */ +# define LOCK_PREFIX /* nothing */ # else -# define LOCK "lock;" +# define LOCK_PREFIX "lock;" # endif #endif #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgb %b2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgb %b2, %1" \ : "=a" (ret), "=m" (*mem) \ : "q" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgw %w2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgw %w2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgl %2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm __volatile (LOCK "cmpxchgq %q2, %1" \ + __asm __volatile (LOCK_PREFIX "cmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" ((long) (newval)), "m" (*mem), \ "0" ((long) (oldval))); \ @@ -110,19 +110,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_exchange_and_add(mem, value) \ ({ __typeof (*mem) result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "xaddb %b0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddb %b0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "xaddw %w0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddw %w0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "xaddl %0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddl %0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else \ - __asm __volatile (LOCK "xaddq %q0, %1" \ + __asm __volatile (LOCK_PREFIX "xaddq %q0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" ((long) (value)), "m" (*mem)); \ result; }) @@ -134,19 +134,19 @@ typedef uintmax_t uatomic_max_t; else if (__builtin_constant_p (value) && (value) == 1) \ atomic_decrement (mem); \ else if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b1, %0" \ + __asm __volatile (LOCK_PREFIX "addb %b1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w1, %0" \ + __asm __volatile (LOCK_PREFIX "addw %w1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %1, %0" \ + __asm __volatile (LOCK_PREFIX "addl %1, %0" \ : "=m" (*mem) \ : "ir" (value), "m" (*mem)); \ else \ - __asm __volatile (LOCK "addq %q1, %0" \ + __asm __volatile (LOCK_PREFIX "addq %q1, %0" \ : "=m" (*mem) \ : "ir" ((long) (value)), "m" (*mem)); \ }) @@ -155,19 +155,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_negative(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addb %b2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addw %w2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addl %2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ - __asm __volatile (LOCK "addq %q2, %0; sets %1" \ + __asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" ((long) (value)), "m" (*mem)); \ __result; }) @@ -176,19 +176,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_zero(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "addb %b2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addb %b2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "addw %w2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addw %w2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "addl %2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addl %2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ - __asm __volatile (LOCK "addq %q2, %0; setz %1" \ + __asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" ((long) (value)), "m" (*mem)); \ __result; }) @@ -196,19 +196,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "incb %b0" \ + __asm __volatile (LOCK_PREFIX "incb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "incw %w0" \ + __asm __volatile (LOCK_PREFIX "incw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "incl %0" \ + __asm __volatile (LOCK_PREFIX "incl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ - __asm __volatile (LOCK "incq %q0" \ + __asm __volatile (LOCK_PREFIX "incq %q0" \ : "=m" (*mem) \ : "m" (*mem)); \ }) @@ -217,19 +217,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment_and_test(mem) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "incb %b0; sete %1" \ + __asm __volatile (LOCK_PREFIX "incb %b0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "incw %w0; sete %1" \ + __asm __volatile (LOCK_PREFIX "incw %w0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "incl %0; sete %1" \ + __asm __volatile (LOCK_PREFIX "incl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ - __asm __volatile (LOCK "incq %q0; sete %1" \ + __asm __volatile (LOCK_PREFIX "incq %q0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ __result; }) @@ -237,19 +237,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "decb %b0" \ + __asm __volatile (LOCK_PREFIX "decb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "decw %w0" \ + __asm __volatile (LOCK_PREFIX "decw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "decl %0" \ + __asm __volatile (LOCK_PREFIX "decl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ - __asm __volatile (LOCK "decq %q0" \ + __asm __volatile (LOCK_PREFIX "decq %q0" \ : "=m" (*mem) \ : "m" (*mem)); \ }) @@ -258,19 +258,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement_and_test(mem) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "decb %b0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decb %b0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "decw %w0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decw %w0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "decl %0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ - __asm __volatile (LOCK "decq %q0; sete %1" \ + __asm __volatile (LOCK_PREFIX "decq %q0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ __result; }) @@ -278,23 +278,23 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_set(mem, bit) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "orb %b2, %0" \ + __asm __volatile (LOCK_PREFIX "orb %b2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1L << (bit))); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "orw %w2, %0" \ + __asm __volatile (LOCK_PREFIX "orw %w2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1L << (bit))); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "orl %2, %0" \ + __asm __volatile (LOCK_PREFIX "orl %2, %0" \ : "=m" (*mem) \ : "m" (*mem), "ir" (1L << (bit))); \ else if (__builtin_constant_p (bit) && (bit) < 32) \ - __asm __volatile (LOCK "orq %2, %0" \ + __asm __volatile (LOCK_PREFIX "orq %2, %0" \ : "=m" (*mem) \ : "m" (*mem), "i" (1L << (bit))); \ else \ - __asm __volatile (LOCK "orq %q2, %0" \ + __asm __volatile (LOCK_PREFIX "orq %q2, %0" \ : "=m" (*mem) \ : "m" (*mem), "r" (1UL << (bit))); \ }) @@ -303,19 +303,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_bit_test_set(mem, bit) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm __volatile (LOCK "btsb %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsb %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else if (sizeof (*mem) == 2) \ - __asm __volatile (LOCK "btsw %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsw %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else if (sizeof (*mem) == 4) \ - __asm __volatile (LOCK "btsl %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsl %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ else \ - __asm __volatile (LOCK "btsq %3, %1; setc %0" \ + __asm __volatile (LOCK_PREFIX "btsq %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ __result; }) --- libc/nptl/sysdeps/i386/tls.h.jj 2003-04-05 03:17:01.000000000 -0500 +++ libc/nptl/sysdeps/i386/tls.h 2003-04-14 07:26:40.000000000 -0400 @@ -169,11 +169,11 @@ union user_desc_init # define INIT_SYSINFO #endif -#ifndef LOCK +#ifndef LOCK_PREFIX # ifdef UP -# define LOCK /* nothing */ +# define LOCK_PREFIX /* nothing */ # else -# define LOCK "lock;" +# define LOCK_PREFIX "lock;" # endif #endif @@ -365,7 +365,7 @@ union user_desc_init ({ __typeof (descr->member) __ret; \ __typeof (oldval) __old = (oldval); \ if (sizeof (descr->member) == 4) \ - asm volatile (LOCK "cmpxchgl %2, %%gs:%P3" \ + asm volatile (LOCK_PREFIX "cmpxchgl %2, %%gs:%P3" \ : "=a" (__ret) \ : "0" (__old), "r" (newval), \ "i" (offsetof (struct pthread, member))); \ @@ -378,7 +378,7 @@ union user_desc_init /* Atomic set bit. */ #define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ (void) ({ if (sizeof ((descr)->member) == 4) \ - asm volatile (LOCK "orl %1, %%gs:%P0" \ + asm volatile (LOCK_PREFIX "orl %1, %%gs:%P0" \ :: "i" (offsetof (struct pthread, member)), \ "ir" (1 << (bit))); \ else \ --- libc/nptl/sysdeps/i386/pthread_spin_lock.c.jj 2002-11-26 17:50:06.000000000 -0500 +++ libc/nptl/sysdeps/i386/pthread_spin_lock.c 2003-04-14 07:31:11.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -19,11 +19,12 @@ #include "pthreadP.h" - -#ifdef UP -# define LOCK -#else -# define LOCK "lock;" +#ifndef LOCK_PREFIX +# ifdef UP +# define LOCK_PREFIX /* nothing */ +# else +# define LOCK_PREFIX "lock;" +# endif #endif @@ -32,7 +33,7 @@ pthread_spin_lock (lock) pthread_spinlock_t *lock; { asm ("\n" - "1:\t" LOCK "decl %0\n\t" + "1:\t" LOCK_PREFIX "decl %0\n\t" "jne 2f\n\t" ".subsection 1\n\t" ".align 16\n" --- libc/nptl/sysdeps/x86_64/tls.h.jj 2003-04-12 18:13:44.000000000 -0400 +++ libc/nptl/sysdeps/x86_64/tls.h 2003-04-14 07:28:18.000000000 -0400 @@ -67,6 +67,14 @@ typedef struct /* Get the thread descriptor definition. */ # include +#ifndef LOCK_PREFIX +# ifdef UP +# define LOCK_PREFIX /* nothing */ +# else +# define LOCK_PREFIX "lock;" +# endif +#endif + /* This is the size of the initial TCB. */ # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) @@ -267,7 +275,7 @@ typedef struct ({ __typeof (descr->member) __ret; \ __typeof (oldval) __old = (oldval); \ if (sizeof (descr->member) == 4) \ - asm volatile (LOCK "cmpxchgl %2, %%fs:%P3" \ + asm volatile (LOCK_PREFIX "cmpxchgl %2, %%fs:%P3" \ : "=a" (__ret) \ : "0" (__old), "r" (newval), \ "i" (offsetof (struct pthread, member))); \ @@ -280,7 +288,7 @@ typedef struct /* Atomic set bit. */ #define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ (void) ({ if (sizeof ((descr)->member) == 4) \ - asm volatile (LOCK "orl %1, %%fs:%P0" \ + asm volatile (LOCK_PREFIX "orl %1, %%fs:%P0" \ :: "i" (offsetof (struct pthread, member)), \ "ir" (1 << (bit))); \ else \ Jakub From jakub@redhat.com Mon Apr 14 13:35:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 14 Apr 2003 13:35:00 -0000 Subject: [PATCH] Fix i686 NPTL compile Message-ID: <20030414133548.GL16629@sunsite.ms.mff.cuni.cz> Hi! Without this e.g. nanosleep.o* don't assemble as .LSAVEBX1 and .LRESTBX1 labels are used in .eh_frame, yet aren't defined anywhere. 2003-04-14 Jakub Jelinek * sysdeps/unix/sysv/linux/i386/sysdep.h (PUSHARGS_1): Add L(SAVEBX1) label. (POPARGS_1): Add L(RESTBX1) label. --- libc/sysdeps/unix/sysv/linux/i386/sysdep.h.jj 2003-04-13 16:44:14.000000000 -0400 +++ libc/sysdeps/unix/sysv/linux/i386/sysdep.h 2003-04-14 08:18:22.000000000 -0400 @@ -247,9 +247,9 @@ __i686.get_pc_thunk.reg: \ #define _DOARGS_0(n) /* No arguments to frob. */ #define _POPARGS_0 /* No arguments to pop. */ -#define PUSHARGS_1 movl %ebx, %edx; PUSHARGS_0 +#define PUSHARGS_1 movl %ebx, %edx; L(SAVEBX1): PUSHARGS_0 #define DOARGS_1 _DOARGS_1 (4) -#define POPARGS_1 POPARGS_0; movl %edx, %ebx +#define POPARGS_1 POPARGS_0; movl %edx, %ebx; L(RESTBX1): #define _PUSHARGS_1 pushl %ebx; L(PUSHBX1): _PUSHARGS_0 #define _DOARGS_1(n) movl n(%esp), %ebx; _DOARGS_0(n-4) #define _POPARGS_1 _POPARGS_0; popl %ebx; L(POPBX1): Jakub From jakub@redhat.com Mon Apr 14 13:36:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 14 Apr 2003 13:36:00 -0000 Subject: [PATCH] Fix sparc64 build Message-ID: <20030414133619.GM16629@sunsite.ms.mff.cuni.cz> Hi! ret_NOERRNO was not defined on sparc64... 2003-04-14 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (ret_NOERRNO): Define. --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h.jj 2003-04-01 04:21:01.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h 2003-04-13 18:51:30.000000000 -0400 @@ -122,6 +122,7 @@ SYSCALL_ERROR_HANDLER_ENTRY(__syscall_er /* Careful here! This "ret" define can interfere; use jmpl if unsure. */ #define ret retl; nop +#define ret_NOERRNO retl; nop #define r0 %o0 #define r1 %o1 #define MOVE(x,y) mov x, y Jakub From jakub@redhat.com Mon Apr 14 15:13:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 14 Apr 2003 15:13:00 -0000 Subject: [PATCH] Fix .eh_frame Message-ID: <20030414151329.GN16629@sunsite.ms.mff.cuni.cz> Hi! This is just a quick patch to fix the .eh_frame. This is still a ticking bomb, as DW_CFA_advance_loc can overflow into DW_CFA_offset or even DW_CFA_restore without giving any errors from assembly. The right thing to do is to use DW_CFA_advance_loc4 everywhere and rely on gas optimizations, because that should be able to create the same .eh_frame as one can do manually and at the same time not generate garbage if distance of two labels suddenly grows to 64, 256 or 65536 bytes. Unfortunately, it seems gas ATM doesn't cope with the gcc 3.x augmentation, will look at it. 2003-04-14 Jakub Jelinek * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use DW_CFA_advance_loc2 for .Laddl-.Lsubl. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use DW_CFA_advance_loc for .Laddl-.Lsubl. --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S.jj 2003-04-14 01:11:34.000000000 -0400 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2003-04-14 09:40:26.000000000 -0400 @@ -412,7 +412,8 @@ versioned_symbol (libpthread, __pthread_ .byte 0x40+.Lsubl-.Lpush4 # DW_CFA_advance_loc+N .byte 14 # DW_CFA_def_cfa_offset .uleb128 64 - .byte 0x40+.Laddl-.Lsubl # DW_CFA_advance_loc+N + .byte 3 # DW_CFA_advance_loc2 + .2byte .Laddl-.Lsubl .byte 14 # DW_CFA_def_cfa_offset .uleb128 20 .byte 0x40+.Lpop_ebx-.Laddl # DW_CFA_advance_loc+N --- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S.jj 2003-04-14 01:00:51.000000000 -0400 +++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2003-04-14 09:48:54.000000000 -0400 @@ -376,7 +376,8 @@ versioned_symbol (libpthread, __pthread_ .byte 0x40+.Lsubl-.Lpush4 # DW_CFA_advance_loc+N .byte 14 # DW_CFA_def_cfa_offset .uleb128 52 - .byte 0x40+.Laddl-.Lsubl # DW_CFA_advance_loc+N + .byte 2 # DW_CFA_advance_loc1 + .byte .Laddl-.Lsubl .byte 14 # DW_CFA_def_cfa_offset .uleb128 16 .byte 0x40+ .Lpop_ebx-.Laddl # DW_CFA_advance_loc+N Jakub From drepper@redhat.com Mon Apr 14 16:49:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 14 Apr 2003 16:49:00 -0000 Subject: [PATCH] Fix sparc64 build In-Reply-To: <20030414133619.GM16629@sunsite.ms.mff.cuni.cz> References: <20030414133619.GM16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E9AE686.4080103@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > ret_NOERRNO was not defined on sparc64... Applied. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+muaG2ijCOnn/RHQRAlGDAJ0aMTtOuPcU6Bo2MwN1n7chf04D9ACgnMoQ S9gxtFjF/wlw7YRJC+NBbWc= =Pyil -----END PGP SIGNATURE----- From drepper@redhat.com Mon Apr 14 17:06:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 14 Apr 2003 17:06:00 -0000 Subject: [PATCH] LOCK -> LOCK_PREFIX In-Reply-To: <20030414133446.GK16629@sunsite.ms.mff.cuni.cz> References: <20030414133446.GK16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E9AEA6F.9060103@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > I think it is a bad idea to use LOCK macro in headers. I've applied the patch. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+mupw2ijCOnn/RHQRAlT6AKCSgkQ5+hoiKNRtxdHBbed5/T0xEgCcC4wP RxJjTTn9Nxf7DRJHNLDeDiU= =4i5O -----END PGP SIGNATURE----- From jakub@redhat.com Tue Apr 15 15:02:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 15 Apr 2003 15:02:00 -0000 Subject: [PATCH] Fix prelinking on ppc32 Message-ID: <20030415150235.GR16629@sunsite.ms.mff.cuni.cz> Hi! When calling elf_machine_rela from dl-conflict.c, sym is NULL, so we certainly cannot do checks on what it points to. BTW: Shouldn't most of the TLS handling go into dl-machine.c on PPC32? I mean, unless there are -fno-pic shared libraries, linker certainly shouldn't keep any TLS relocs but R_PPC_DTPMOD32, R_PPC_DTPREL32 and R_PPC_TPREL32 around and thus the rest doesn't hurt if it is slower. 2003-04-15 Jakub Jelinek * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Avoid checking R_PPC_RELATIVE, R_PPC_NONE and whether relocation is against local symbol in conflict processing. --- libc/sysdeps/powerpc/powerpc32/dl-machine.h.jj 2003-04-01 04:20:54.000000000 -0500 +++ libc/sysdeps/powerpc/powerpc32/dl-machine.h 2003-04-15 09:08:04.000000000 -0400 @@ -365,6 +365,7 @@ elf_machine_rela (struct link_map *map, struct link_map *sym_map; #endif +#ifndef RESOLVE_CONFLICT_FIND_MAP if (r_type == R_PPC_RELATIVE) { *reloc_addr = map->l_addr + reloc->r_addend; @@ -381,18 +382,21 @@ elf_machine_rela (struct link_map *map, value = map->l_addr; else { -#if defined USE_TLS && !defined RTLD_BOOTSTRAP +# if defined USE_TLS && !defined RTLD_BOOTSTRAP sym_map = RESOLVE_MAP (&sym, version, r_type); value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; -#else +# else value = RESOLVE (&sym, version, r_type); -# ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP if (sym != NULL) -# endif +# endif value += sym->st_value; -#endif +# endif } value += reloc->r_addend; +#else + value = reloc->r_addend; +#endif /* A small amount of code is duplicated here for speed. In libc, more than 90% of the relocs are R_PPC_RELATIVE; in the X11 shared Jakub From sjmunroe@us.ibm.com Tue Apr 15 19:32:00 2003 From: sjmunroe@us.ibm.com (Steven Munroe) Date: Tue, 15 Apr 2003 19:32:00 -0000 Subject: PPC atomic.h and compare_exchange_val forms Message-ID: <3E9C5E50.1020302@us.ibm.com> I sent the patch to libc-alpha to fix the current problem for PPC64 but I think there is a larger issue that needs to be discussed. For the macros defined by include/atomic.h, which forms are included for the convenience of specific architecture and which forms are part of the common API (i.e. can they be freely used in arch independent parts of glibc)? For example atomic_compare_and_exchange_val_acq. Are all forms (8-, 16-, 32-, and 64-bit) of this operation expected to be available for general use? A quick review of arch specific atomic.h's shows that only i386 and m68k support the 8- and 16-bit forms. Most arch's define these to abort(). The 64-bit form is also problematic on most 32-bit arches. For PPC32/PPC64 implementing the 8- and 16-bit forms would be problematic. The resulting code would be slow and prone to live lock conditions. I assume that this is true for most architectures. I recommend dropping any mention of the 8- and 16-bit forms from include/atomic.h. From drepper@redhat.com Tue Apr 15 19:41:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 15 Apr 2003 19:41:00 -0000 Subject: PPC atomic.h and compare_exchange_val forms In-Reply-To: <3E9C5E50.1020302@us.ibm.com> References: <3E9C5E50.1020302@us.ibm.com> Message-ID: <3E9C6053.802@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steven Munroe wrote: > I recommend dropping any mention of the 8- and 16-bit forms from > include/atomic.h. The definitions can be used in machine-specific files. Therefore they'll not be dropped. You don't have to implement them for every architecture, it might just mean different sources are going to be used. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+nGBT2ijCOnn/RHQRAtmRAJ9VtaRIF4V8e75yZu9xhdsvixbfgwCfST56 ABxRO36DEgM7l3TBeXrgORg= =g3rg -----END PGP SIGNATURE----- From drepper@redhat.com Tue Apr 15 19:43:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 15 Apr 2003 19:43:00 -0000 Subject: [PATCH] Fix prelinking on ppc32 In-Reply-To: <20030415150235.GR16629@sunsite.ms.mff.cuni.cz> References: <20030415150235.GR16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E9C60C3.4010506@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've applied the patch. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+nGDD2ijCOnn/RHQRAiuCAKC3BkeWyIYlAMsEwmmonRwMgerYDACdGARr 8C54wi1QQSs98lXt/Ngc8Uo= =jrn5 -----END PGP SIGNATURE----- From jakub@redhat.com Wed Apr 16 21:11:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 16 Apr 2003 21:11:00 -0000 Subject: [PATCH] Add 3 new tls tests Message-ID: <20030416211056.GS16629@sunsite.ms.mff.cuni.cz> Hi! A couple of testcases from prelink converted to glibc machinery (and of couse not testing whether prelink TLS support works, just that those testcases pass). 2003-04-16 Jakub Jelinek * elf/Makefile (distribute): Add tst-tlsmod{[7-9],1[0-2]}.c and tst-tls10.h. (tests): Add tst-tls1[0-2]. (modules-names): Add tst-tlsmod{[7-8],1[0-2]}. ($(objpfx)tst-tlsmod8.so): Depend on tst-tlsmod7.so. ($(objpfx)tst-tlsmod10.so): Depend on tst-tlsmod9.so. ($(objpfx)tst-tlsmod12.so): Depend on tst-tlsmod11.so. ($(objpfx)tst-tls10): Depend on tst-tlsmod8.so. ($(objpfx)tst-tls11): Depend on tst-tlsmod10.so. ($(objpfx)tst-tls12): Depend on tst-tlsmod12.so. * elf/tst-tls10.c: New test. * elf/tst-tls11.c: New test. * elf/tst-tls12.c: New test. * elf/tst-tls10.h: New file. * elf/tst-tlsmod7.c: New file. * elf/tst-tlsmod8.c: New file. * elf/tst-tlsmod9.c: New file. * elf/tst-tlsmod10.c: New file. * elf/tst-tlsmod11.c: New file. * elf/tst-tlsmod12.c: New file. --- libc/elf/tst-tls10.h.jj 2003-04-16 16:12:25.000000000 -0400 +++ libc/elf/tst-tls10.h 2003-04-16 16:21:48.000000000 -0400 @@ -0,0 +1,38 @@ +#include +#include + +#if defined USE_TLS && defined HAVE___THREAD \ + && defined HAVE_TLS_MODEL_ATTRIBUTE +# define USE_TLS__THREAD + +struct A +{ + char a; + int b; + long long c; +}; + +extern __thread struct A a1, a2, a3, a4; +extern struct A *f1a (void); +extern struct A *f2a (void); +extern struct A *f3a (void); +extern struct A *f4a (void); +extern struct A *f5a (void); +extern struct A *f6a (void); +extern struct A *f7a (void); +extern struct A *f8a (void); +extern struct A *f9a (void); +extern struct A *f10a (void); +extern int f1b (void); +extern int f2b (void); +extern int f3b (void); +extern int f4b (void); +extern int f5b (void); +extern int f6b (void); +extern int f7b (void); +extern int f8b (void); +extern int f9b (void); +extern int f10b (void); +extern void check1 (void); +extern void check2 (void); +#endif --- libc/elf/tst-tls10.c.jj 2003-04-16 16:15:35.000000000 -0400 +++ libc/elf/tst-tls10.c 2003-04-16 16:41:15.000000000 -0400 @@ -0,0 +1,40 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +static __thread int dummy = 12; +__thread struct A local = { 1, 2, 3 }; +#endif + +#define CHECK(N, S) \ + p = f##N##a (); \ + if (p->a != S || p->b != S + 1 || p->c != S + 2) \ + abort () + +int +main (void) +{ +#ifdef USE_TLS__THREAD + struct A *p; + if (local.a != 1 || local.b != 2 || local.c != 3) + abort (); + if (a1.a != 4 || a1.b != 5 || a1.c != 6) + abort (); + if (a2.a != 22 || a2.b != 23 || a2.c != 24) + abort (); + if (a3.a != 10 || a3.b != 11 || a3.c != 12) + abort (); + if (a4.a != 25 || a4.b != 26 || a4.c != 27) + abort (); + check1 (); + check2 (); + if (f1a () != &a1 || f2a () != &a2 || f3a () != &a3 || f4a () != &a4) + abort (); + CHECK (5, 16); + CHECK (6, 19); + if (f7a () != &a2 || f8a () != &a4) + abort (); + CHECK (9, 28); + CHECK (10, 31); +#endif + exit (0); +} --- libc/elf/tst-tlsmod7.c.jj 2003-04-16 16:16:47.000000000 -0400 +++ libc/elf/tst-tlsmod7.c 2003-04-16 16:24:36.000000000 -0400 @@ -0,0 +1,103 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +static __thread int dummy = 12; +__thread struct A a1 = { 4, 5, 6 }; +__thread struct A a2 = { 7, 8, 9 }; +__thread struct A a3 __attribute__((tls_model("initial-exec"))) + = { 10, 11, 12 }; +__thread struct A a4 __attribute__((tls_model("initial-exec"))) + = { 13, 14, 15 }; +static __thread struct A local1 = { 16, 17, 18 }; +static __thread struct A local2 __attribute__((tls_model("initial-exec"))) + = { 19, 20, 21 }; + +void +check1 (void) +{ + if (a1.a != 4 || a1.b != 5 || a1.c != 6) + abort (); + if (a2.a != 22 || a2.b != 23 || a2.c != 24) + abort (); + if (a3.a != 10 || a3.b != 11 || a3.c != 12) + abort (); + if (a4.a != 25 || a4.b != 26 || a4.c != 27) + abort (); + if (local1.a != 16 || local1.b != 17 || local1.c != 18) + abort (); + if (local2.a != 19 || local2.b != 20 || local2.c != 21) + abort (); +} + +struct A * +f1a (void) +{ + return &a1; +} + +struct A * +f2a (void) +{ + return &a2; +} + +struct A * +f3a (void) +{ + return &a3; +} + +struct A * +f4a (void) +{ + return &a4; +} + +struct A * +f5a (void) +{ + return &local1; +} + +struct A * +f6a (void) +{ + return &local2; +} + +int +f1b (void) +{ + return a1.a; +} + +int +f2b (void) +{ + return a2.b; +} + +int +f3b (void) +{ + return a3.c; +} + +int +f4b (void) +{ + return a4.a; +} + +int +f5b (void) +{ + return local1.b; +} + +int +f6b (void) +{ + return local2.c; +} +#endif --- libc/elf/tst-tlsmod8.c.jj 2003-04-16 16:18:48.000000000 -0400 +++ libc/elf/tst-tlsmod8.c 2003-04-16 16:25:04.000000000 -0400 @@ -0,0 +1,72 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +static __thread long long dummy = 12; +__thread struct A a2 = { 22, 23, 24 }; +__thread struct A a4 __attribute__((tls_model("initial-exec"))) + = { 25, 26, 27 }; +static __thread struct A local1 = { 28, 29, 30 }; +static __thread struct A local2 __attribute__((tls_model("initial-exec"))) + = { 31, 32, 33 }; + +void +check2 (void) +{ + if (a2.a != 22 || a2.b != 23 || a2.c != 24) + abort (); + if (a4.a != 25 || a4.b != 26 || a4.c != 27) + abort (); + if (local1.a != 28 || local1.b != 29 || local1.c != 30) + abort (); + if (local2.a != 31 || local2.b != 32 || local2.c != 33) + abort (); +} + +struct A * +f7a (void) +{ + return &a2; +} + +struct A * +f8a (void) +{ + return &a4; +} + +struct A * +f9a (void) +{ + return &local1; +} + +struct A * +f10a (void) +{ + return &local2; +} + +int +f7b (void) +{ + return a2.b; +} + +int +f8b (void) +{ + return a4.a; +} + +int +f9b (void) +{ + return local1.b; +} + +int +f10b (void) +{ + return local2.c; +} +#endif --- libc/elf/tst-tls11.c.jj 2003-04-16 16:22:46.000000000 -0400 +++ libc/elf/tst-tls11.c 2003-04-16 16:23:53.000000000 -0400 @@ -0,0 +1,27 @@ +#include "tst-tls10.h" + +#define CHECK(N, S) \ + p = f##N##a (); \ + if (p->a != S || p->b != S + 1 || p->c != S + 2) \ + abort () + +int +main (void) +{ +#ifdef USE_TLS__THREAD + struct A *p; + check1 (); + check2 (); + CHECK (1, 4); + CHECK (2, 22); + CHECK (3, 10); + CHECK (4, 25); + CHECK (5, 16); + CHECK (6, 19); + CHECK (7, 22); + CHECK (8, 25); + CHECK (9, 28); + CHECK (10, 31); +#endif + exit (0); +} --- libc/elf/tst-tlsmod9.c.jj 2003-04-16 16:26:14.000000000 -0400 +++ libc/elf/tst-tlsmod9.c 2003-04-16 16:27:12.000000000 -0400 @@ -0,0 +1,101 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +static __thread int dummy = 12; +__thread struct A a1 = { 4, 5, 6 }; +__thread struct A a3 __attribute__((tls_model("initial-exec"))) + = { 10, 11, 12 }; +extern __thread struct A a4 __attribute__((tls_model("initial-exec"))); +static __thread struct A local1 = { 16, 17, 18 }; +static __thread struct A local2 __attribute__((tls_model("initial-exec"))) + = { 19, 20, 21 }; + +void +check1 (void) +{ + if (a1.a != 4 || a1.b != 5 || a1.c != 6) + abort (); + if (a2.a != 22 || a2.b != 23 || a2.c != 24) + abort (); + if (a3.a != 10 || a3.b != 11 || a3.c != 12) + abort (); + if (a4.a != 25 || a4.b != 26 || a4.c != 27) + abort (); + if (local1.a != 16 || local1.b != 17 || local1.c != 18) + abort (); + if (local2.a != 19 || local2.b != 20 || local2.c != 21) + abort (); +} + +struct A * +f1a (void) +{ + return &a1; +} + +struct A * +f2a (void) +{ + return &a2; +} + +struct A * +f3a (void) +{ + return &a3; +} + +struct A * +f4a (void) +{ + return &a4; +} + +struct A * +f5a (void) +{ + return &local1; +} + +struct A * +f6a (void) +{ + return &local2; +} + +int +f1b (void) +{ + return a1.a; +} + +int +f2b (void) +{ + return a2.b; +} + +int +f3b (void) +{ + return a3.c; +} + +int +f4b (void) +{ + return a4.a; +} + +int +f5b (void) +{ + return local1.b; +} + +int +f6b (void) +{ + return local2.c; +} +#endif --- libc/elf/tst-tls12.c.jj 2003-04-16 16:27:56.000000000 -0400 +++ libc/elf/tst-tls12.c 2003-04-16 16:28:18.000000000 -0400 @@ -0,0 +1,17 @@ +#include "tst-tls10.h" + +#define CHECK(N, S) \ + p = &a##N; \ + if (p->a != S || p->b != S + 1 || p->c != S + 2) \ + abort () + +int main() +{ +#ifdef USE_TLS__THREAD + struct A *p; + check1 (); + CHECK (1, 4); + CHECK (2, 7); +#endif + exit (0); +} --- libc/elf/tst-tlsmod11.c.jj 2003-04-16 16:28:38.000000000 -0400 +++ libc/elf/tst-tlsmod11.c 2003-04-16 16:28:53.000000000 -0400 @@ -0,0 +1,6 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +__thread struct A a1 = { 4, 5, 6 }; +__thread struct A a2 = { 7, 8, 9 }; +#endif --- libc/elf/tst-tlsmod10.c.jj 2003-04-16 16:40:51.000000000 -0400 +++ libc/elf/tst-tlsmod10.c 2003-04-16 16:40:42.000000000 -0400 @@ -0,0 +1 @@ +#include "tst-tlsmod8.c" --- libc/elf/Makefile.jj 2003-04-01 04:20:42.000000000 -0500 +++ libc/elf/Makefile 2003-04-16 16:43:54.000000000 -0400 @@ -69,7 +69,9 @@ distribute := rtld-Rules \ unwind-dw2.c unwind-dw2-fde.c unwind.h unwind-pe.h \ unwind-dw2-fde.h dwarf2.h dl-procinfo.c tls.h dl-tls.h \ tst-tlsmod1.c tst-tlsmod2.c tst-tlsmod3.c tst-tlsmod4.c \ - tst-tlsmod5.c tst-tlsmod6.c \ + tst-tlsmod5.c tst-tlsmod6.c tst-tlsmod7.c tst-tlsmod8.c \ + tst-tlsmod9.c tst-tlsmod10.c tst-tlsmod11.c \ + tst-tlsmod12.c tst-tls10.h \ circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \ circlemod3.c circlemod3a.c nodlopenmod2.c \ tls-macros.h \ @@ -142,7 +144,8 @@ tests += loadtest restest1 preloadtest l $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \ neededtest3 neededtest4 unload2 lateglobal initfirst global \ restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \ - circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 + circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \ + tst-tls10 tst-tls11 tst-tls12 # reldep9 test-srcs = tst-pathopt tests-vis-yes = vismain @@ -163,7 +166,8 @@ modules-names = testobj1 testobj2 testob reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 \ reldep7mod1 reldep7mod2 \ tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \ - tst-tlsmod5 tst-tlsmod6 \ + tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \ + tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \ circlemod1 circlemod1a circlemod2 circlemod2a \ circlemod3 circlemod3a \ reldep8mod1 reldep8mod2 reldep8mod3 \ @@ -376,6 +380,9 @@ $(objpfx)reldep6mod2.so: $(objpfx)reldep $(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so $(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so $(objpfx)tst-tlsmod3.so: $(objpfx)tst-tlsmod2.so +$(objpfx)tst-tlsmod8.so: $(objpfx)tst-tlsmod7.so +$(objpfx)tst-tlsmod10.so: $(objpfx)tst-tlsmod9.so +$(objpfx)tst-tlsmod12.so: $(objpfx)tst-tlsmod11.so # For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED $(objpfx)tst-tlsmod5.so: $(common-objpfx)libc.so $(objpfx)tst-tlsmod6.so: $(common-objpfx)libc.so @@ -577,6 +584,12 @@ $(objpfx)tst-tls8.out: $(objpfx)tst-tlsm $(objpfx)tst-tls9: $(libdl) $(objpfx)tst-tls9.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so +$(objpfx)tst-tls10: $(objpfx)tst-tlsmod8.so + +$(objpfx)tst-tls11: $(objpfx)tst-tlsmod10.so + +$(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so + ifdef libdl $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so --- libc/elf/tst-tlsmod12.c.jj 2003-04-16 16:29:07.000000000 -0400 +++ libc/elf/tst-tlsmod12.c 2003-04-16 16:29:58.000000000 -0400 @@ -0,0 +1,14 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +extern __thread struct A a2 __attribute__((tls_model("initial-exec"))); + +void +check1 (void) +{ + if (a1.a != 4 || a1.b != 5 || a1.c != 6) + abort (); + if (a2.a != 7 || a2.b != 8 || a2.c != 9) + abort (); +} +#endif Jakub From drepper@redhat.com Thu Apr 17 02:18:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 17 Apr 2003 02:18:00 -0000 Subject: getifaddrs Message-ID: <3E9E0ED9.9070208@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You might have seen that I changed ifaddrs.c quite a bit. We got a report that it crashes if an interface has lots of IPv6 addresses. I could confirm that. After the changes I see no more crashes. Unfortunately I don't really know which change fixed it. Anyway, the new code should be faster and more secure since all copy operations are first checked. Please look at the changes. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+ng7Z2ijCOnn/RHQRAsmIAKCia3z7qL+HjAD/OYcrTDF3ay1cTgCfcoAF LKCU0YRvmovLlxW2dMVywg4= =8cWA -----END PGP SIGNATURE----- From drepper@redhat.com Thu Apr 17 19:19:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 17 Apr 2003 19:19:00 -0000 Subject: [PATCH] Add 3 new tls tests In-Reply-To: <20030416211056.GS16629@sunsite.ms.mff.cuni.cz> References: <20030416211056.GS16629@sunsite.ms.mff.cuni.cz> Message-ID: <3E9EFE2F.6010501@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > A couple of testcases from prelink converted to glibc machinery > (and of couse not testing whether prelink TLS support works, just that > those testcases pass). I applied the patch now. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+nv4v2ijCOnn/RHQRAoLyAJ9cXJ2bfVmMv64UmvkeS2K9XriNHACgh7VJ OHqag9KrFb6WfaZNf/Xm63o= =m9Oj -----END PGP SIGNATURE----- From jes@wildopensource.com Fri Apr 18 21:12:00 2003 From: jes@wildopensource.com (Jes Sorensen) Date: Fri, 18 Apr 2003 21:12:00 -0000 Subject: posix_fadvise() on ia64 and Alpha Message-ID: Whoops did it again - trying the right address this time. Hi, Ray Bry pointed out to me that there is a disreprency between the glibc ia64 (and I noticed Alpha as well) definitions of POSIX_FADV_DONTNEED and POSIX_FADV_NOREUSE compared to the kernel. Anyone know if there is a deliberate reason for this or if it was a mistake? I wont rule out that I blindly copied over the changes from the Alpha back when I introduced the file, but it's been a while. Anyway, for the case that it's unintentional, patch included (2.2), should apply cleanly to 2.3 as well. Cheers, Jes 2003-04-18 * libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Sync with Linux 2.5.67. * libc/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Likewise. --- sysdeps/unix/sysv/linux/ia64/bits/fcntl.h.~1.4.~ Fri Jul 6 00:56:17 2001 +++ sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Fri Apr 18 16:55:49 2003 @@ -169,6 +169,6 @@ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ # define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif --- sysdeps/unix/sysv/linux/alpha/bits/fcntl.h.~1.14.~ Fri Jul 6 00:56:13 2001 +++ sysdeps/unix/sysv/linux/alpha/bits/fcntl.h Fri Apr 18 16:57:48 2003 @@ -168,6 +168,6 @@ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ # define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ #endif From drepper@redhat.com Sat Apr 19 17:57:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 19 Apr 2003 17:57:00 -0000 Subject: cancellation support changes Message-ID: <3EA18DD0.2060903@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've checked in a bunch of changes to support cancellation handling whic interacts with C++. This requires that we have unwind info which in turn requires that functions which can cause (directly or indirectly) cancellation to not be marked with throw(). The patches introduce a minimal set of these changes. There might be more changes necessary. The next steps are big, too. There are two problems remaining: - make sure that all code paths which can lead to cancellation points are compiled with unwind info; this means adding a lot of -fexceptions. It should be done individually, not en gros. - functions which are in POSIX and not listed in the tables in section 2.9.5.2 have to be written in a way which doesn't cause cancellation. I've thought about this a bit. Using macros in include/unistd.h or so is too dangerous. It's too easy to pick the wrong code since there is no easy way to control it. So we better modify the sources. Note that before making the functions in libc itself cancelable we didn't have the problem. Using __libc_open for instance meant that no cancellation could happen. We'll have to go through the sources again and make those changes. One possible optimization which can be applied while doing this is what I started with the not-cancel.h files. I haven't done much using them since I first want to get some feedback. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+oY3V2ijCOnn/RHQRAtnkAKC3pOkfV1O7L14Z5BGxWjVU1fLhNACgpmng bxbEO/lcMhOrg+ZZeK0x0H4= =RemC -----END PGP SIGNATURE----- From drepper@redhat.com Sat Apr 19 18:33:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 19 Apr 2003 18:33:00 -0000 Subject: posix_fadvise() on ia64 and Alpha In-Reply-To: References: Message-ID: <3EA19668.4080807@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jes Sorensen wrote: > Anyone know if there is a deliberate reason for this or if it was a > mistake? I wont rule out that I blindly copied over the changes from > the Alpha back when I introduced the file, but it's been a while. I definitely think you copied the Alpha values. And the only reason I could think of why the Alpha values are what we have now is because of OSF. Maybe. In any case, it must change, there is no value in diverging from the kernel. I applied the patch. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+oZZo2ijCOnn/RHQRAhW/AKCH1atQrZYbhAgMn6dGaEKcEllhZgCffpt7 mRJjhJmnH7cT0oBpQy7i9ck= =iFWy -----END PGP SIGNATURE----- From jakub@redhat.com Tue Apr 22 22:45:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 22 Apr 2003 22:45:00 -0000 Subject: [PATCH] Warning fix for tst-tls* Message-ID: <20030422224544.GW16629@sunsite.ms.mff.cuni.cz> Hi! Sorry for letting this slip in initially. 2003-04-23 Jakub Jelinek * elf/tst-tls12.c (main): Fix declaration. * elf/tst-tls10.c (dummy): Make hidden instead of static. * elf/tst-tlsmod7.c (dummy): Likewise. * elf/tst-tlsmod8.c (dummy): Likewise. * elf/tst-tlsmod9.c (dummy): Likewise. --- libc/elf/tst-tls12.c.jj 2003-04-17 15:19:01.000000000 -0400 +++ libc/elf/tst-tls12.c 2003-04-22 18:42:00.000000000 -0400 @@ -5,7 +5,8 @@ if (p->a != S || p->b != S + 1 || p->c != S + 2) \ abort () -int main() +int +main (void) { #ifdef USE_TLS__THREAD struct A *p; --- libc/elf/tst-tlsmod9.c.jj 2003-04-17 15:19:01.000000000 -0400 +++ libc/elf/tst-tlsmod9.c 2003-04-22 18:40:39.000000000 -0400 @@ -1,7 +1,7 @@ #include "tst-tls10.h" #ifdef USE_TLS__THREAD -static __thread int dummy = 12; +static __thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a1 = { 4, 5, 6 }; __thread struct A a3 __attribute__((tls_model("initial-exec"))) = { 10, 11, 12 }; --- libc/elf/tst-tls10.c.jj 2003-04-22 18:39:29.000000000 -0400 +++ libc/elf/tst-tls10.c 2003-04-22 18:39:16.000000000 -0400 @@ -1,7 +1,7 @@ #include "tst-tls10.h" #ifdef USE_TLS__THREAD -static __thread int dummy = 12; +__thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A local = { 1, 2, 3 }; #endif --- libc/elf/tst-tlsmod7.c.jj 2003-04-17 15:19:01.000000000 -0400 +++ libc/elf/tst-tlsmod7.c 2003-04-22 18:40:03.000000000 -0400 @@ -1,7 +1,7 @@ #include "tst-tls10.h" #ifdef USE_TLS__THREAD -static __thread int dummy = 12; +__thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a1 = { 4, 5, 6 }; __thread struct A a2 = { 7, 8, 9 }; __thread struct A a3 __attribute__((tls_model("initial-exec"))) --- libc/elf/tst-tlsmod8.c.jj 2003-04-17 15:19:01.000000000 -0400 +++ libc/elf/tst-tlsmod8.c 2003-04-22 18:40:27.000000000 -0400 @@ -1,7 +1,7 @@ #include "tst-tls10.h" #ifdef USE_TLS__THREAD -static __thread long long dummy = 12; +__thread long long dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a2 = { 22, 23, 24 }; __thread struct A a4 __attribute__((tls_model("initial-exec"))) = { 25, 26, 27 }; Jakub From roland@redhat.com Wed Apr 23 01:40:00 2003 From: roland@redhat.com (Roland McGrath) Date: Wed, 23 Apr 2003 01:40:00 -0000 Subject: libpthread_nonshared.a link order Message-ID: <200304230140.h3N1emP27540@magilla.sf.frob.com> Would there be any harm in swapping the link order from libpthread.so libpthread_nonshared.a to libpthread_nonshared.a libpthread.so ? That works around an ld bug on ppc that makes glibc not build right now. The ld bug will get fixed. But if there is no harm to changing the link order, I will do that now so that ppc is not held up waiting for the ld fix. I think the details here are all the same for NPTL and LinuxThreads, though I have only tried the LT build on ppc lately. Thanks, Roland From roland@redhat.com Wed Apr 23 01:55:00 2003 From: roland@redhat.com (Roland McGrath) Date: Wed, 23 Apr 2003 01:55:00 -0000 Subject: [PATCH] Warning fix for tst-tls* In-Reply-To: Jakub Jelinek's message of Wednesday, 23 April 2003 00:45:44 +0200 <20030422224544.GW16629@sunsite.ms.mff.cuni.cz> Message-ID: <200304230155.h3N1tB812499@magilla.sf.frob.com> > 2003-04-23 Jakub Jelinek > > * elf/tst-tls12.c (main): Fix declaration. > * elf/tst-tls10.c (dummy): Make hidden instead of static. > * elf/tst-tlsmod7.c (dummy): Likewise. > * elf/tst-tlsmod8.c (dummy): Likewise. > * elf/tst-tlsmod9.c (dummy): Likewise. I put these in with one typo fix. Thanks, Roland From drepper@redhat.com Wed Apr 23 06:01:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 23 Apr 2003 06:01:00 -0000 Subject: libpthread_nonshared.a link order In-Reply-To: <200304230140.h3N1emP27540@magilla.sf.frob.com> References: <200304230140.h3N1emP27540@magilla.sf.frob.com> Message-ID: <3EA62C00.60908@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roland McGrath wrote: > Would there be any harm in swapping the link order from > libpthread.so libpthread_nonshared.a > to > libpthread_nonshared.a libpthread.so > ? There shouldn't be any harm. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+piwA2ijCOnn/RHQRAvWOAKDD5ozgympHEcTps2RMBwTDXkHitwCfQrNt ZwDjuCs/60kxvrPGm5kPtvQ= =rlyi -----END PGP SIGNATURE----- From jakub@redhat.com Wed Apr 23 09:58:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 23 Apr 2003 09:58:00 -0000 Subject: [PATCH] Fix getaddrinfo Message-ID: <20030423095652.GX16629@sunsite.ms.mff.cuni.cz> Hi! https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=91234&action=view has a testcase. If the caller manages to leave -1 on the stack in the place which becomes herrno, then gaih_inet will eat all the stack and die. Fixed thusly: 2003-04-23 Jakub Jelinek * sysdeps/posix/getaddrinfo.c (gaih_inet): Check for rc == ERANGE, not rc == errno. Use extend_alloca. --- libc/sysdeps/posix/getaddrinfo.c.jj 2002-12-20 07:36:31.000000000 -0500 +++ libc/sysdeps/posix/getaddrinfo.c 2003-04-23 05:15:51.000000000 -0400 @@ -677,13 +677,11 @@ gaih_inet (const char *name, const struc int herrno; struct hostent th; size_t tmpbuflen = 512; - char *tmpbuf; + char *tmpbuf = NULL; do { - tmpbuflen *= 2; - tmpbuf = __alloca (tmpbuflen); - + tmpbuf = extend_alloca (tmpbuf, tmpbuflen, tmpbuflen * 2); rc = __gethostbyaddr_r (at2->addr, ((at2->family == AF_INET6) ? sizeof(struct in6_addr) @@ -692,7 +690,7 @@ gaih_inet (const char *name, const struc &h, &herrno); } - while (rc == errno && herrno == NETDB_INTERNAL); + while (rc == ERANGE && herrno == NETDB_INTERNAL); if (rc != 0 && herrno == NETDB_INTERNAL) { Jakub From drepper@redhat.com Wed Apr 23 17:22:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 23 Apr 2003 17:22:00 -0000 Subject: [PATCH] Fix getaddrinfo In-Reply-To: <20030423095652.GX16629@sunsite.ms.mff.cuni.cz> References: <20030423095652.GX16629@sunsite.ms.mff.cuni.cz> Message-ID: <3EA6CBB8.3080401@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jakub Jelinek wrote: > 2003-04-23 Jakub Jelinek > > * sysdeps/posix/getaddrinfo.c (gaih_inet): Check for rc == ERANGE, > not rc == errno. Use extend_alloca. That patch is fine, I applied it. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+psu42ijCOnn/RHQRAj2BAKDNgRNjRLHUKxKOw5a4Mug3OCj3pACgqtK+ VCRTg5HOVVW53e3rBFUi+HM= =a8RD -----END PGP SIGNATURE----- From sjmunroe@us.ibm.com Fri Apr 25 19:37:00 2003 From: sjmunroe@us.ibm.com (Steven Munroe) Date: Fri, 25 Apr 2003 19:37:00 -0000 Subject: make install fails with nptl Message-ID: <3EA98868.BECF036A@us.ibm.com> Tried a glibc make install --enable-add-ons=nptl and the make install failed with AWK=gawk /bin/sh libc-texinfo.sh 'intro.texi errno.texi memory.texi ctype.texi string.texi charset.texi locale.texi message.texi search.texi pattern.texi io.texi stdio.texi llio.texi filesys.texi pipe.texi socket.texi terminal.texi syslog.texi math.texi arith.texi time.texi resource.texi setjmp.texi signal.texi startup.texi process.texi job.texi nss.texi users.texi sysinfo.texi conf.texi crypt.texi debug.texi' '' 'lang.texi header.texi install.texi maint.texi contrib.texi freemanuals.texi' LANGUAGE=C LC_ALL=C makeinfo libc.texinfo ./summary.texi:9341: Cross reference to nonexistent node `Threads and Signal Handling'. ./summary.texi:8726: Cross reference to nonexistent node `POSIX Semaphores'. ./summary.texi:8721: Cross reference to nonexistent node `POSIX Semaphores'. ./summary.texi:8716: Cross reference to nonexistent node `POSIX Semaphores'. ./summary.texi:8711: Cross reference to nonexistent node `POSIX Semaphores'. .... ./summary.texi:7166: Cross reference to nonexistent node `Basic Thread Operations'. ./summary.texi:7161: Cross reference to nonexistent node `Thread Attributes'. ./summary.texi:7156: Cross reference to nonexistent node `Thread Attributes'. ./summary.texi:7151: Cross reference to nonexistent node `Thread Attributes'. ./summary.texi:7146: Cross reference to nonexistent node `Thread Attributes'. ./summary.texi:7141: Cross reference to nonexistent node `Threads and Fork'. makeinfo: Removing output file `/work/libc23-ppc64nptl-20030421/manual/libc.info' due to errors; use --force to preserve. make[2]: *** [libc.info] Error 2 make[2]: Leaving directory `/work/libc23-ppc64nptl-20030421/manual' make[1]: *** [manual/subdir_install] Error 2 make[1]: Leaving directory `/work/libc23-ppc64nptl-20030421' make: *** [install] Error 2. It seems that makeinfo filtered out ./linuxthreads/linuxthreads.texi (since it is not in the add-ons list) but only linuxthreads.texi defines the "nodes" required by summary.texi Do we need a ../nptl/nptl.texi? -- Steven Munroe sjmunroe@us.ibm.com Linux on PowerPC-64 Development GLIBC for PowerPC-64 Development -------------- next part -------------- A non-text attachment was scrubbed... Name: makeinstalllog09-46d.txt.bz2 Type: application/octet-stream Size: 21007 bytes Desc: not available URL: From drepper@redhat.com Fri Apr 25 19:51:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 25 Apr 2003 19:51:00 -0000 Subject: make install fails with nptl In-Reply-To: <3EA98868.BECF036A@us.ibm.com> References: <3EA98868.BECF036A@us.ibm.com> Message-ID: <3EA9917A.9050903@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steven Munroe wrote: > Do we need a ../nptl/nptl.texi? Sure we do. Do you volunteer to write it? And I don't mean copying the old document which isn't apprpriate in form and content. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+qZF62ijCOnn/RHQRAj83AJ4vAdIONVMp5GCaADusCgdXp7wV+QCgsxqL LBIZJuvMARt3Hr850UzuGEo= =HKuR -----END PGP SIGNATURE----- From jbailey@nisa.net Fri Apr 25 20:03:00 2003 From: jbailey@nisa.net (Jeff Bailey) Date: Fri, 25 Apr 2003 20:03:00 -0000 Subject: make install fails with nptl In-Reply-To: <3EA98868.BECF036A@us.ibm.com> References: <3EA98868.BECF036A@us.ibm.com> Message-ID: <20030425200345.GB4041@nisa.net> On Fri, Apr 25, 2003 at 02:11:36PM -0500, Steven Munroe wrote: > Tried a glibc make install --enable-add-ons=nptl and the make install > failed with > ./summary.texi:8726: Cross reference to nonexistent node `POSIX Semaphores'. > ./summary.texi:8721: Cross reference to nonexistent node `POSIX Semaphores'. Where are these nodes coming from? grep "POSIX Semaphores" * isn't turning up any references in the manual subdirectory. We build i386-gnu fine without linuxthreads.texi, and the relevent sections are wrapped with @ifset linuxthreads. Tks, Jeff Bailey -- You said homosexuals form a small percentage of the population. So do Jews. Is that a reason to deny someone equality? - Richard Marceau From schwab@suse.de Sat Apr 26 18:47:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Sat, 26 Apr 2003 18:47:00 -0000 Subject: Suspect expression in elf/dl-close.c Message-ID: The following line in elf/dl-close.c looks wrong: while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0) I think it should rather be this: while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)) Andreas. 2003-04-26 Andreas Schwab * elf/dl-close.c (remove_slotinfo): Fix missing parens. --- elf/dl-close.c.~1.96.~ 2003-04-25 14:15:34.000000000 +0200 +++ elf/dl-close.c 2003-04-26 20:14:45.000000000 +0200 @@ -80,7 +80,7 @@ remove_slotinfo (size_t idx, struct dtv_ return true; } - while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0) + while (idx - disp > (disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)) { --idx; From schwab@suse.de Sat Apr 26 18:47:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Sat, 26 Apr 2003 18:47:00 -0000 Subject: TLS_MULTIPLE_THREADS_IN_TCB build fix Message-ID: This fixes building on ppc with TLS. Andreas. 2003-04-26 Andreas Schwab * pthread.c (__pthread_initialize_manager): Fix use of p_multiple_threads. --- linuxthreads/pthread.c.~1.124.~ 2003-04-26 18:45:06.000000000 +0200 +++ linuxthreads/pthread.c 2003-04-26 20:32:09.000000000 +0200 @@ -622,7 +622,7 @@ int __pthread_initialize_manager(void) mgr->p_header.data.self = mgr; mgr->p_header.data.multiple_threads = 1; #elif TLS_MULTIPLE_THREADS_IN_TCB - p_multiple_threads (mgr) = 1; + mgr->p_multiple_threads = 1; #endif mgr->p_lock = &__pthread_handles[1].h_lock; # ifndef HAVE___THREAD From drepper@redhat.com Sat Apr 26 18:53:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 26 Apr 2003 18:53:00 -0000 Subject: TLS_MULTIPLE_THREADS_IN_TCB build fix In-Reply-To: References: Message-ID: <3EAAD562.9000509@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Schwab wrote: > This fixes building on ppc with TLS. I've already changed this. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+qtVi2ijCOnn/RHQRAubhAKCTQENC41fv2QrO6iyz1HT3NQ7PUQCffL4X Va9Nb6UmSVG+gzMov/fTmi4= =B5CX -----END PGP SIGNATURE----- From drepper@redhat.com Sat Apr 26 20:13:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 26 Apr 2003 20:13:00 -0000 Subject: Suspect expression in elf/dl-close.c In-Reply-To: References: Message-ID: <3EAAE852.705@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Schwab wrote: > The following line in elf/dl-close.c looks wrong: > > while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0) Yep. I've applied the patch. Thanks, - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+quhS2ijCOnn/RHQRAphOAJoCk674tvXHlN4GRhHf7IM/Qi/ixgCcDwQW 9YJdAeTvJfrz0Dc0RwRxcYE= =NEKa -----END PGP SIGNATURE----- From drepper@redhat.com Sun Apr 27 06:22:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 27 Apr 2003 06:22:00 -0000 Subject: dlclose and TLS Message-ID: <3EAB7704.40804@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've checked in some code to fix dlclose of modules with static TLS for TLS_TCB_AT_TP platforms. The existing code was completely broken but I thnk it should more or less work for TLS_DTV_AT_TP platforms. I left it completely alone for now. Hopefully somebody will look at it a bit closer. The new tests should test the code somewhat. Just holes aren't tested. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+q3cE2ijCOnn/RHQRAqdcAJ42XK1PtF/wEia8//OUcYqS0YlTxACePpzv Zl0+Gk5vSxdYepvmna4kMZw= =/C8I -----END PGP SIGNATURE----- From drepper@redhat.com Sun Apr 27 08:19:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 27 Apr 2003 08:19:00 -0000 Subject: PROVIDE problems Message-ID: <3EAB926D.9020408@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I had problems with Roland's change to the linker script generation. Adding PROVIDE to define __start___libc_freeres_ptrs etc didn't work for some reason. I've removed the PROVIDEs now. This means we have a few more symbols where they don't belong but it's better than nothing. This might be a linker bug but I'm not sure about this at this point. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+q5Jt2ijCOnn/RHQRArd2AKC1CpTtdpb6PG9LQKWeT+/amC7yBwCgw7gB yimMpCqTaif2KKIdGhmy394= =W9p3 -----END PGP SIGNATURE----- From schwab@suse.de Sun Apr 27 16:11:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Sun, 27 Apr 2003 16:11:00 -0000 Subject: abilist fixes for m68k-linux Message-ID: This fixes some omissions from the abilists for m68k-linux. Andreas. --- abilist/ld.abilist.~1.2.~ 2003-04-02 06:39:52.000000000 +0200 +++ abilist/ld.abilist 2003-04-27 15:38:45.000000000 +0200 @@ -1,7 +1,7 @@ -GLIBC_2.0 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls +GLIBC_2.0 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls GLIBC_2.0 A _r_debug D 0x14 -GLIBC_2.0 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls +GLIBC_2.0 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls | GLIBC_2.2.5 x86_64-.*-linux.*/tls | GLIBC_2.2 ia64-.*-linux.*/tls s390x-.*-linux.*/tls | GLIBC_2.3 powerpc64-.*-linux.*/thread @@ -10,9 +10,9 @@ GLIBC_2.0 i.86-.*-linux.*/notls i.86-.*- free F malloc F realloc F -GLIBC_2.1 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls +GLIBC_2.1 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls GLIBC_2.1 A -GLIBC_2.1 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls +GLIBC_2.1 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls | GLIBC_2.2.5 x86_64-.*-linux.*/tls | GLIBC_2.2 ia64-.*-linux.*/tls s390x-.*-linux.*/tls | GLIBC_2.3 powerpc64-.*-linux.*/thread @@ -25,7 +25,7 @@ GLIBC_2.2.5 x86_64-.*-linux.*/tls _r_debug D 0x28 GLIBC_2.2 ia64-.*-linux.*/tls s390x-.*-linux.*/tls GLIBC_2.2 A -GLIBC_2.3 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls ia64-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls powerpc64-.*-linux.*/thread s390-.*-linux.*/tls s390x-.*-linux.*/tls x86_64-.*-linux.*/tls +GLIBC_2.3 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls ia64-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls powerpc64-.*-linux.*/thread s390-.*-linux.*/tls s390x-.*-linux.*/tls x86_64-.*-linux.*/tls GLIBC_2.3 A GLIBC_2.3 i.86-.*-linux.*/thread i.86-.*-linux.*/tls ___tls_get_addr F --- abilist/libc.abilist.~1.5.~ 2003-04-03 23:11:11.000000000 +0200 +++ abilist/libc.abilist 2003-04-27 15:37:18.000000000 +0200 @@ -2088,7 +2088,7 @@ GLIBC_2.2 i.86-.*-linux.*/notls i.86-.*- __ctype32_toupper D 0x4 _res_hconf D 0x30 svc_pollfd D 0x4 -GLIBC_2.2 i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls +GLIBC_2.2 i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls s390-.*-linux.*/tls _IO_wfile_jumps D 0x54 GLIBC_2.2 ia64-.*-linux.*/tls __clone2 F @@ -2120,14 +2120,14 @@ GLIBC_2.3.2 i.86-.*-linux.*/notls i.86-. sched_getaffinity F sched_setaffinity F strptime_l F -GLIBC_2.3.2 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls ia64-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls powerpc64-.*-linux.*/thread s390-.*-linux.*/tls s390x-.*-linux.*/tls x86_64-.*-linux.*/tls +GLIBC_2.3.2 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls ia64-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls powerpc64-.*-linux.*/thread s390-.*-linux.*/tls s390x-.*-linux.*/tls x86_64-.*-linux.*/tls epoll_create F epoll_ctl F epoll_wait F GLIBC_2.3.3 i.86-.*-linux.*/notls i.86-.*-linux.*/thread i.86-.*-linux.*/tls ia64-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls powerpc64-.*-linux.*/thread s390-.*-linux.*/tls s390x-.*-linux.*/tls sh[34].*-.*-linux.*/notls sh[34].*-.*-linux.*/thread sh[34].*-.*-linux.*/tls x86_64-.*-linux.*/tls GLIBC_2.3.3 A remap_file_pages F -GLIBC_2.3.3 i.86-.*-linux.*/thread i.86-.*-linux.*/tls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls +GLIBC_2.3.3 i.86-.*-linux.*/thread i.86-.*-linux.*/tls m68.*-.*-linux.*/notls powerpc-.*-linux.*/notls powerpc-.*-linux.*/thread powerpc-.*-linux.*/tls _sys_siglist D 0x104 sys_sigabbrev D 0x104 sys_siglist D 0x104 From schwab@suse.de Sun Apr 27 16:11:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Sun, 27 Apr 2003 16:11:00 -0000 Subject: Incomplete dependencies for libio/old*.c Message-ID: Dependencies are generated using the non-pic command line (ie. without -DSHARED). This is a problem with some of the compatibility sources which check SHLIB_COMPAT before including the headers, so that the generated dependency list is incomplete. Andreas. 2003-04-27 Andreas Schwab * Makeconfig (+mkdep): Add -DMAKING_DEPENDENCIES. * include/shlib-compat.h (SHLIB_COMPAT) [MAKING_DEPENDENCIES]: Define to 1. --- Makeconfig.~1.282.~ 2003-04-16 23:05:35.000000000 +0200 +++ Makeconfig 2003-04-27 14:21:24.000000000 +0200 @@ -557,7 +557,7 @@ endif # The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy # targets for headers so that removed headers don't break the build. ifndef +mkdep -+mkdep = $(CC) -M -MP ++mkdep = $(CC) -DMAKING_DEPENDENCIES -M -MP endif # The program that makes Emacs-style TAGS files. --- include/shlib-compat.h.~1.10.~ 2002-10-14 11:06:09.000000000 +0200 +++ include/shlib-compat.h 2003-04-27 14:23:50.000000000 +0200 @@ -26,7 +26,12 @@ #include /* header generated by abi-versions.awk */ #endif -#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING +#ifdef MAKING_DEPENDENCIES + +/* While computing dependencies we want to see all headers. */ +# define SHLIB_COMPAT(lib, introduced, obsoleted) 1 + +#elif defined HAVE_ELF && defined SHARED && defined DO_VERSIONING /* The file abi-versions.h (generated by scripts/abi-versions.awk) defines symbols like `ABI_libm_GLIBC_2_0' for each version set in the source From schwab@suse.de Sun Apr 27 16:11:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Sun, 27 Apr 2003 16:11:00 -0000 Subject: Fix sysd-sorted generation Message-ID: The sysd-sorted rule didn't work in a subdirectory. Andreas. 2003-04-27 Andreas Schwab * Makeconfig ($(common-objpfx)sysd-sorted): Fix for running in subdirectory. --- Makeconfig.~1.282.~ 2003-04-16 23:05:35.000000000 +0200 +++ Makeconfig 2003-04-27 16:50:18.000000000 +0200 @@ -927,11 +927,11 @@ $(common-objpfx)sysd-dirs: $(common-objp all-Depend-files = $(wildcard $(..)*/Depend) $(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \ $(common-objpfx)sysd-dirs $(..)Makeconfig - { { dirs='$(patsubst $(..)%/Depend,$(..)%,$(filter %/Depend,$^))';\ + { { dirs='$(patsubst $(..)%/Depend,%,$(filter %/Depend,$^))'; \ for d in $$dirs; do \ while read on; do \ echo "depend $$d $$on"; \ - done < $$d/Depend; \ + done < $(..)$$d/Depend; \ done; \ for f in $(all-subdirs); do \ echo $$f; \ From roland@redhat.com Sun Apr 27 18:31:00 2003 From: roland@redhat.com (Roland McGrath) Date: Sun, 27 Apr 2003 18:31:00 -0000 Subject: PROVIDE problems In-Reply-To: Ulrich Drepper's message of Sunday, 27 April 2003 01:18:53 -0700 <3EAB926D.9020408@redhat.com> Message-ID: <200304271831.h3RIVuf13768@magilla.sf.frob.com> > I had problems with Roland's change to the linker script generation. > Adding PROVIDE to define __start___libc_freeres_ptrs etc didn't work for > some reason. I've removed the PROVIDEs now. This means we have a few > more symbols where they don't belong but it's better than nothing. This > might be a linker bug but I'm not sure about this at this point. What broken results did you see? It looked ok to me. The linker produces the symbols as undefined locals in the libc.so .symtab, which is odd. But it uses the right values in the GOT, where it matters. From roland@redhat.com Sun Apr 27 18:35:00 2003 From: roland@redhat.com (Roland McGrath) Date: Sun, 27 Apr 2003 18:35:00 -0000 Subject: Incomplete dependencies for libio/old*.c In-Reply-To: Andreas Schwab's message of , 27 April 2003 14:36:56 +0200 Message-ID: <200304271835.h3RIZGW13785@magilla.sf.frob.com> This is a band-aid that still doesn't guarantee the results will be correct in all cases. Instead, we should try out the idea of using -MD output with separate .d files for each object flavor. From roland@redhat.com Sun Apr 27 18:36:00 2003 From: roland@redhat.com (Roland McGrath) Date: Sun, 27 Apr 2003 18:36:00 -0000 Subject: Fix sysd-sorted generation In-Reply-To: Andreas Schwab's message of , 27 April 2003 16:54:11 +0200 Message-ID: <200304271836.h3RIaUj13819@magilla.sf.frob.com> > 2003-04-27 Andreas Schwab > > * Makeconfig ($(common-objpfx)sysd-sorted): Fix for running in > subdirectory. I put this in. Thanks, Roland From drepper@redhat.com Sun Apr 27 18:38:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 27 Apr 2003 18:38:00 -0000 Subject: PROVIDE problems In-Reply-To: <200304271831.h3RIVuf13768@magilla.sf.frob.com> References: <200304271831.h3RIVuf13768@magilla.sf.frob.com> Message-ID: <3EAC2382.7040502@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roland McGrath wrote: >>I had problems with Roland's change to the linker script generation. > What broken results did you see? It looked ok to me. The linker produces > the symbols as undefined locals in the libc.so .symtab, which is odd. > But it uses the right values in the GOT, where it matters. The problem is simply that at the libc_freeres handling doesn't happen and therefore mtrace tests fail. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+rCOD2ijCOnn/RHQRApX5AJ9CbGxakwndBJVN+TI5gNTUMpyqEQCgt3Xg ao6sfNuiAN+wwyn5Upo+3U4= =P3rw -----END PGP SIGNATURE----- From sjmunroe@us.ibm.com Tue Apr 29 00:07:00 2003 From: sjmunroe@us.ibm.com (Steven Munroe) Date: Tue, 29 Apr 2003 00:07:00 -0000 Subject: dlclose and TLS Message-ID: <3EADC241.8080103@us.ibm.com> Ulrich Drepper writes: > I've checked in some code to fix dlclose of modules with static TLS > for TLS_TCB_AT_TP platforms. The existing code was completely broken > but I thnk it should more or less work for TLS_DTV_AT_TP platforms. As of this morning ppc and ppc64 linuxthreads are working but nplt is not. At the moment nptl-0.36 is out sync with glibc at cvs head. The problem I fould was that (at glibc cvs head) TLS_TCB_SIZE (defined as 0) was removed from the TLS_TPREL_VALUE calculation (in sysdeps/powerpc/dl-tls.h). To compensate the size of tcbhead_t was rolled into TLS_PRE_TCB_SIZE (in linuxthreads/sysdeps/powerpc/tls.h). Also dtv addressing was changed to use (TCBP)[-1].dtv. The nptl sysdeps/powerpc/tls.h is still using the old definition (TLS_PRE_TCB_SIZE does not include sizeof(tcbhead_t)) so all TPREL relocations are off by sizeof(tcbhead_t). Unfortunately my attemps so far (by either changing powerpc/dl-tls.h (add TLS_TCB_SIZE back) or nptl's powerpc/tls.h (make it look like linuxthreads powerpc/tls.h) have successed in getting ppc32/64 nptl working. There seems to be dependences in glibc for TLS_TCB_SIZE to be 0 and in nptl-0.36 for it to be sizeof(tcbhead_t) Is anyone else working on the corresponing nptl changes? If not what are the generic glibc dependences on TLS_TCB_SIZE and TLS_PRE_TCB_SIZE for TLS_DTV_AT_TP platforms? -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: nptl-tls-glibc-0428.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ppc-dl-tls-20030428.patch URL: From drepper@redhat.com Tue Apr 29 00:18:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 29 Apr 2003 00:18:00 -0000 Subject: dlclose and TLS In-Reply-To: <3EADC241.8080103@us.ibm.com> References: <3EADC241.8080103@us.ibm.com> Message-ID: <3EADC4AD.2040506@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Steven Munroe wrote: > As of this morning ppc and ppc64 linuxthreads are working but nplt is > not. At the moment nptl-0.36 is out sync with glibc at cvs head. I have already changes for nptl in my tree. I just have to find time to release them. Once this is done check them. There shouldn't be any problems. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+rcSt2ijCOnn/RHQRAmlyAKCUAfhyenrOHb67wxMACnuc+yp2dACfUAy+ gbMTVXKXfFgl5O7aCcyjBNo= =88bM -----END PGP SIGNATURE----- From schwab@suse.de Tue Apr 29 08:58:00 2003 From: schwab@suse.de (Andreas Schwab) Date: Tue, 29 Apr 2003 08:58:00 -0000 Subject: Attribute used does not exist Message-ID: 2003-04-29 Andreas Schwab * string/test-strcat.c (do_one_test): Fix attribute name. --- string/test-strcat.c.~1.2.~ 2003-04-22 10:02:03.000000000 +0200 +++ string/test-strcat.c 2003-04-29 10:56:14.000000000 +0200 @@ -59,8 +59,8 @@ do_one_test (impl_t *impl, char *dst, co if (HP_TIMING_AVAIL) { - hp_timing_t start __attribute ((used)); - hp_timing_t stop __attribute ((used)); + hp_timing_t start __attribute ((unused)); + hp_timing_t stop __attribute ((unused)); hp_timing_t best_time = ~ (hp_timing_t) 0; size_t i; Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N??rnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From sjmunroe@us.ibm.com Tue Apr 29 17:46:00 2003 From: sjmunroe@us.ibm.com (Steve Munroe) Date: Tue, 29 Apr 2003 17:46:00 -0000 Subject: dlclose and TLS Message-ID: Ulrich Drepper writes: > I have already changes for nptl in my tree. I just have to find time to > release them. Once this is done check them. There shouldn't be any > problems. The nptl-0.37 release builds and runs make check without failures for both PPC32 and PPC64. Thanks! From jakub@redhat.com Tue Apr 29 21:07:00 2003 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 29 Apr 2003 21:07:00 -0000 Subject: [PATCH] libc_hidden_builtin_* Message-ID: <20030429210734.GI16629@sunsite.ms.mff.cuni.cz> Hi! This patch makes the builtin functions bypass .plt if using recent enough gcc - on i686/NPTL I'm at 44 .plt slots in libc.so. I had to touch string-inlines.c (because otherwise there were some memset calls going through .plt) and while at it, I fixed the long standing problem where -O0 -D__USE_STRING_INLINES (or just with too much inlining) binaries/libraries compiled against i386 headers cannot be run against i686 libc.so and similarly such bins/libs compiled against i686 headers cannot be run against i386 libc.so. There is still one memmove call (in inet_mkadr.os) which needs another GCC patch to bypass .plt, plus if I counted well out of the remaining 43 libc.so .plt slots 11 could be still killed. Tested with make check and make check-abi. 2003-04-29 Jakub Jelinek * configure.in: Change __oline__ to $LINENO. (HAVE_BUILTIN_REDIRECTION): New check. * configure: Rebuilt. * config.h.in (HAVE_BUILTIN_REDIRECTION): Add. * include/libc-symbols.h (libc_hidden_builtin_proto, libc_hidden_builtin_def, libc_hidden_builtin_weak, libc_hidden_builtin_ver): Define. * include/string.h (memchr, memcpy, memmove, memset, strcat, strchr, strcmp, strcpy, strcspn, strlen, strncmp, strncpy, strpbrk, strrchr, strspn, strstr): Add libc_hidden_builtin_proto. * intl/plural.y: Include string.h. * intl/plural.c: Rebuilt. * sysdeps/alpha/alphaev6/memchr.S (memchr): Add libc_hidden_builtin_def. * sysdeps/alpha/alphaev6/memcpy.S (memcpy): Likewise. * sysdeps/alpha/alphaev6/memset.S (memset): Likewise. * sysdeps/alpha/alphaev67/strcat.S (strcat): Likewise. * sysdeps/alpha/alphaev67/strchr.S (strchr): Likewise. * sysdeps/alpha/alphaev67/strlen.S (strlen): Likewise. * sysdeps/alpha/alphaev67/strrchr.S (strrchr): Likewise. * sysdeps/alpha/memchr.S (memchr): Likewise. * sysdeps/alpha/memset.S (memset): Likewise. * sysdeps/alpha/strcat.S (strcat): Likewise. * sysdeps/alpha/strchr.S (strchr): Likewise. * sysdeps/alpha/strcmp.S (strcmp): Likewise. * sysdeps/alpha/strcpy.S (strcpy): Likewise. * sysdeps/alpha/strlen.S (strlen): Likewise. * sysdeps/alpha/strncmp.S (strncmp): Likewise. * sysdeps/alpha/strncpy.S (strncpy): Likewise. * sysdeps/alpha/strrchr.S (strrchr): Likewise. * sysdeps/arm/memset.S (memset): Likewise. * sysdeps/arm/strlen.S (strlen): Likewise. * sysdeps/generic/memchr.c (memchr): Likewise. * sysdeps/generic/memcpy.c (memcpy): Likewise. * sysdeps/generic/memmove.c (memmove): Likewise. * sysdeps/generic/memset.c (memset): Likewise. * sysdeps/generic/strcat.c (strcat): Likewise. * sysdeps/generic/strchr.c (strchr): Likewise. * sysdeps/generic/strcmp.c (strcmp): Likewise. * sysdeps/generic/strcpy.c (strcpy): Likewise. * sysdeps/generic/strcspn.c (strcspn): Likewise. * sysdeps/generic/strlen.c (strlen): Likewise. * sysdeps/generic/strncmp.c (strncmp): Likewise. * sysdeps/generic/strncpy.c (strncpy): Likewise. * sysdeps/generic/strpbrk.c (strpbrk): Likewise. * sysdeps/generic/strrchr.c (strrchr): Likewise. * sysdeps/generic/strspn.c (strspn): Likewise. * sysdeps/generic/strstr.c (strstr): Likewise. * sysdeps/i386/i486/strcat.S (strcat): Likewise. * sysdeps/i386/i486/strlen.S (strlen): Likewise. * sysdeps/i386/i586/memcpy.S (memcpy): Likewise. * sysdeps/i386/i586/memset.S (memset): Likewise. * sysdeps/i386/i586/strchr.S (strchr): Likewise. * sysdeps/i386/i586/strcpy.S (strcpy): Likewise. * sysdeps/i386/i586/strlen.S (strlen): Likewise. * sysdeps/i386/i686/memcpy.S (memcpy): Likewise. * sysdeps/i386/i686/memmove.S (memmove): Likewise. * sysdeps/i386/i686/memset.S (memset): Likewise. * sysdeps/i386/i686/strcmp.S (strcmp): Likewise. * sysdeps/i386/memchr.S (memchr): Likewise. * sysdeps/i386/memset.c (memset): Likewise. * sysdeps/i386/strchr.S (strchr): Likewise. * sysdeps/i386/strcspn.S (strcspn): Likewise. * sysdeps/i386/strlen.c (strlen): Likewise. * sysdeps/i386/strpbrk.S (strpbrk): Likewise. * sysdeps/i386/strrchr.S (strrchr): Likewise. * sysdeps/i386/strspn.S (strspn): Likewise. * sysdeps/ia64/memchr.S (memchr): Likewise. * sysdeps/ia64/memcpy.S (memcpy): Likewise. * sysdeps/ia64/memmove.S (memmove): Likewise. * sysdeps/ia64/memset.S (memset): Likewise. * sysdeps/ia64/strcat.S (strcat): Likewise. * sysdeps/ia64/strchr.S (strchr): Likewise. * sysdeps/ia64/strcmp.S (strcmp): Likewise. * sysdeps/ia64/strcpy.S (strcpy): Likewise. * sysdeps/ia64/strlen.S (strlen): Likewise. * sysdeps/ia64/strncmp.S (strncmp): Likewise. * sysdeps/ia64/strncpy.S (strncpy): Likewise. * sysdeps/m68k/memchr.S (memchr): Likewise. * sysdeps/m68k/strchr.S (strchr): Likewise. * sysdeps/mips/mips64/memcpy.S (memcpy): Likewise. * sysdeps/mips/mips64/memset.S (memset): Likewise. * sysdeps/mips/memcpy.S (memcpy): Likewise. * sysdeps/mips/memset.S (memset): Likewise. * sysdeps/powerpc/powerpc32/memset.S (memset): Likewise. * sysdeps/powerpc/powerpc32/strchr.S (strchr): Likewise. * sysdeps/powerpc/powerpc32/strcmp.S (strcmp): Likewise. * sysdeps/powerpc/powerpc32/strcpy.S (strcpy): Likewise. * sysdeps/powerpc/powerpc32/strlen.S (strlen): Likewise. * sysdeps/powerpc/powerpc64/memcpy.S (memcpy): Likewise. * sysdeps/powerpc/powerpc64/memset.S (memset): Likewise. * sysdeps/powerpc/powerpc64/strchr.S (strchr): Likewise. * sysdeps/powerpc/powerpc64/strcmp.S (strcmp): Likewise. * sysdeps/powerpc/powerpc64/strcpy.S (strcpy): Likewise. * sysdeps/powerpc/powerpc64/strlen.S (strlen): Likewise. * sysdeps/powerpc/strcat.c (strcat): Likewise. * sysdeps/sparc/sparc32/memchr.S (memchr): Likewise. * sysdeps/sparc/sparc32/memcpy.S (memcpy): Likewise. * sysdeps/sparc/sparc32/memset.S (memset): Likewise. * sysdeps/sparc/sparc32/strcat.S (strcat): Likewise. * sysdeps/sparc/sparc32/strchr.S (strchr, strrchr): Likewise. * sysdeps/sparc/sparc32/strcmp.S (strcmp): Likewise. * sysdeps/sparc/sparc32/strcpy.S (strcpy): Likewise. * sysdeps/sparc/sparc32/strlen.S (strlen): Likewise. * sysdeps/sparc/sparc64/sparcv9b/memcpy.S (memcpy, memmove): Likewise. * sysdeps/sparc/sparc64/memchr.S (memchr): Likewise. * sysdeps/sparc/sparc64/memcpy.S (memcpy, memmove): Likewise. * sysdeps/sparc/sparc64/memset.S (memset): Likewise. * sysdeps/sparc/sparc64/strcat.S (strcat): Likewise. * sysdeps/sparc/sparc64/strchr.S (strchr, strrchr): Likewise. * sysdeps/sparc/sparc64/strcmp.S (strcmp): Likewise. * sysdeps/sparc/sparc64/strcpy.S (strcpy): Likewise. * sysdeps/sparc/sparc64/strcspn.S (strcspn): Likewise. * sysdeps/sparc/sparc64/strlen.S (strlen): Likewise. * sysdeps/sparc/sparc64/strncmp.S (strncmp): Likewise. * sysdeps/sparc/sparc64/strncpy.S (strncpy): Likewise. * sysdeps/sparc/sparc64/strpbrk.S (strpbrk): Likewise. * sysdeps/sparc/sparc64/strspn.S (strspn): Likewise. * sysdeps/sh/memcpy.S (memcpy): Likewise. * sysdeps/sh/memset.S (memset): Likewise. * sysdeps/sh/strlen.S (strlen): Likewise. * sysdeps/s390/s390-32/memchr.S (memchr): Likewise. * sysdeps/s390/s390-32/memcpy.S (memcpy): Likewise. * sysdeps/s390/s390-32/memset.S (memset): Likewise. * sysdeps/s390/s390-32/strcmp.S (strcmp): Likewise. * sysdeps/s390/s390-32/strcpy.S (strcpy): Likewise. * sysdeps/s390/s390-32/strncpy.S (strncpy): Likewise. * sysdeps/s390/s390-64/memchr.S (memchr): Likewise. * sysdeps/s390/s390-64/memcpy.S (memcpy): Likewise. * sysdeps/s390/s390-64/memset.S (memset): Likewise. * sysdeps/s390/s390-64/strcmp.S (strcmp): Likewise. * sysdeps/s390/s390-64/strcpy.S (strcpy): Likewise. * sysdeps/s390/s390-64/strncpy.S (strncpy): Likewise. * sysdeps/x86_64/memcpy.S (memcpy): Likewise. * sysdeps/x86_64/memset.S (memset): Likewise. * sysdeps/x86_64/strcat.S (strcat): Likewise. * sysdeps/x86_64/strchr.S (strchr): Likewise. * sysdeps/x86_64/strcmp.S (strcmp): Likewise. * sysdeps/x86_64/strcpy.S (strcpy): Likewise. * sysdeps/x86_64/strcspn.S (strcspn): Likewise. * sysdeps/x86_64/strlen.S (strlen): Likewise. * sysdeps/x86_64/strspn.S (strspn): Likewise. * string/string-inlines.c: Move... * sysdeps/generic/string-inlines.c: ...here. (__memcpy_g, __strchr_g): Remove. (__NO_INLINE__): Define before including , undefine after. Include bits/string.h and bits/string2.h. * sysdeps/i386/i486/string-inlines.c: New file. * sysdeps/i386/string-inlines.c: New file. * sysdeps/i386/i486/Versions: Remove. All GLIBC_2.1.1 symbols moved... * sysdeps/i386/Versions (libc): ...here. --- libc/include/libc-symbols.h.jj 2003-01-05 16:08:44.000000000 -0500 +++ libc/include/libc-symbols.h 2003-04-29 09:59:02.000000000 -0400 @@ -720,4 +720,16 @@ # define libm_hidden_data_ver(local, name) #endif +#ifdef HAVE_BUILTIN_REDIRECTION +# define libc_hidden_builtin_proto(name, attrs...) libc_hidden_proto (name, ##attrs) +# define libc_hidden_builtin_def(name) libc_hidden_def (name) +# define libc_hidden_builtin_weak(name) libc_hidden_weak (name) +# define libc_hidden_builtin_ver(local, name) libc_hidden_ver (local, name) +#else +# define libc_hidden_builtin_proto(name, attrs...) +# define libc_hidden_builtin_def(name) +# define libc_hidden_builtin_weak(name) +# define libc_hidden_builtin_ver(local, name) +#endif + #endif /* libc-symbols.h */ --- libc/include/string.h.jj 2002-08-28 06:58:01.000000000 -0400 +++ libc/include/string.h 2003-04-29 10:04:01.000000000 -0400 @@ -79,6 +79,23 @@ libc_hidden_proto (__strverscmp) libc_hidden_proto (basename) libc_hidden_proto (strcoll) +libc_hidden_builtin_proto (memchr) +libc_hidden_builtin_proto (memcpy) +libc_hidden_builtin_proto (memmove) +libc_hidden_builtin_proto (memset) +libc_hidden_builtin_proto (strcat) +libc_hidden_builtin_proto (strchr) +libc_hidden_builtin_proto (strcmp) +libc_hidden_builtin_proto (strcpy) +libc_hidden_builtin_proto (strcspn) +libc_hidden_builtin_proto (strlen) +libc_hidden_builtin_proto (strncmp) +libc_hidden_builtin_proto (strncpy) +libc_hidden_builtin_proto (strpbrk) +libc_hidden_builtin_proto (strrchr) +libc_hidden_builtin_proto (strspn) +libc_hidden_builtin_proto (strstr) + # ifndef _ISOMAC # ifndef index # define index(s, c) (strchr ((s), (c))) --- libc/intl/plural.y.jj 2002-01-30 12:01:23.000000000 -0500 +++ libc/intl/plural.y 2003-04-29 11:38:52.000000000 -0400 @@ -32,6 +32,7 @@ #include #include +#include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, --- libc/intl/plural.c.jj 2002-06-21 05:36:33.000000000 -0400 +++ libc/intl/plural.c 2003-04-29 11:39:41.000000000 -0400 @@ -51,6 +51,7 @@ #include #include +#include #include "plural-exp.h" /* The main function generated by the parser is called __gettextparse, --- libc/string/string-inlines.c.jj 2002-12-31 21:38:05.000000000 -0500 +++ libc/string/string-inlines.c 2003-04-29 12:27:41.000000000 -0400 @@ -1,39 +0,0 @@ -/* Copyright (C) 1999, 2002 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* and declare some extern inline - functions. These functions are declared additionally here if - inlining is not possible. */ - -#undef __USE_STRING_INLINES -#define __USE_STRING_INLINES -#define _FORCE_INLINES -#define __STRING_INLINE /* empty */ - -/* This is to avoid PLT entries for the x86 version. */ -#define __memcpy_g __memcpy_g_internal -#define __strchr_g __strchr_g_internal - -#include - -#ifdef __memcpy_c -# undef __memcpy_g -strong_alias (__memcpy_g_internal, __memcpy_g) -# undef __strchr_g -strong_alias (__strchr_g_internal, __strchr_g) -#endif --- libc/sysdeps/alpha/alphaev6/memchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev6/memchr.S 2003-04-29 10:06:32.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). EV6 optimized by Rick Gorton . @@ -190,3 +190,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/alpha/alphaev6/memcpy.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev6/memcpy.S 2003-04-29 10:09:34.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. EV6 optimized by Rick Gorton . @@ -252,3 +252,4 @@ $nomoredata: nop # E : END(memcpy) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/alpha/alphaev6/memset.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev6/memset.S 2003-04-29 10:16:09.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) EV6 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -221,3 +221,4 @@ $end: ret $31,($26),1 # L0 : END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/alpha/alphaev67/strcat.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev67/strcat.S 2003-04-29 10:21:09.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -59,3 +59,4 @@ $found: cttz $2, $3 # U0 : jmp $31, __stxcpy # L0 : END(strcat) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/alpha/alphaev67/strchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev67/strchr.S 2003-04-29 10:24:23.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson , 1996. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -98,3 +98,4 @@ $found: END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/alpha/alphaev67/strlen.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev67/strlen.S 2003-04-29 10:34:02.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -58,3 +58,4 @@ $found: ret $31, ($26) # L0 : END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/alpha/alphaev67/strrchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/alphaev67/strrchr.S 2003-04-29 10:43:24.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. EV67 optimized by Rick Gorton . This file is part of the GNU C Library. @@ -114,3 +114,4 @@ $eos: END(strrchr) weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/alpha/memchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/memchr.S 2003-04-29 10:06:12.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger (davidm@cs.arizona.edu). @@ -173,3 +173,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/alpha/memset.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/memset.S 2003-04-29 10:15:58.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -134,3 +134,4 @@ $oneq: $done: ret END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/alpha/strcat.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strcat.S 2003-04-29 10:21:03.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -69,3 +69,4 @@ $found: negq t1, t2 # clear all but jmp $31, __stxcpy END(strcat) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/alpha/strchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strchr.S 2003-04-29 10:24:15.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@tamu.edu) @@ -92,3 +92,4 @@ $retnull: END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/alpha/strcmp.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strcmp.S 2003-04-29 10:27:28.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -192,3 +192,4 @@ $done: ret # e1 : END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/alpha/strcpy.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strcpy.S 2003-04-29 10:29:08.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson , 1996. @@ -39,3 +39,4 @@ ENTRY(strcpy) jmp $31, __stxcpy # do the copy END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/alpha/strlen.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strlen.S 2003-04-29 10:33:54.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by David Mosberger (davidm@cs.arizona.edu). This file is part of the GNU C Library. @@ -74,3 +74,4 @@ $found: negq t1, t2 # clear all but ret END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/alpha/strncmp.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strncmp.S 2003-04-29 10:36:52.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -221,3 +221,4 @@ $zerolength: ret END(strncmp) +libc_hidden_builtin_def (strncmp) --- libc/sysdeps/alpha/strncpy.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strncpy.S 2003-04-29 10:40:38.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc. Contributed by Richard Henderson (rth@tamu.edu) This file is part of the GNU C Library. @@ -85,3 +85,4 @@ $zerocount: ret # .. e1 : END(strncpy) +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/alpha/strrchr.S.jj 2001-08-23 12:49:20.000000000 -0400 +++ libc/sysdeps/alpha/strrchr.S 2003-04-29 10:43:18.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2003 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 @@ -108,3 +108,4 @@ $retnull: END(strrchr) weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/arm/memset.S.jj 2001-08-23 12:49:23.000000000 -0400 +++ libc/sysdeps/arm/memset.S 2003-04-29 10:16:15.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell @@ -65,3 +65,4 @@ ENTRY(memset) strb a2, [a4], $1 RETINSTR(mov,pc,lr) END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/arm/strlen.S.jj 2001-08-23 12:49:24.000000000 -0400 +++ libc/sysdeps/arm/strlen.S 2003-04-29 10:34:09.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Code contributed by Matthew Wilcox @@ -61,3 +61,4 @@ Llastword: @ drop through to here onc addne r0, r0, $1 @ must be zero) RETINSTR(mov,pc,lr) END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/generic/memchr.c.jj 2001-08-23 12:49:33.000000000 -0400 +++ libc/sysdeps/generic/memchr.c 2003-04-29 10:07:10.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,93,96,97,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,96,97,99,2000,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -212,3 +212,4 @@ __memchr (s, c_in, n) #ifdef weak_alias weak_alias (__memchr, BP_SYM (memchr)) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/generic/memcpy.c.jj 2001-08-23 12:49:33.000000000 -0400 +++ libc/sysdeps/generic/memcpy.c 2003-04-29 10:09:46.000000000 -0400 @@ -1,6 +1,6 @@ /* Copy memory to memory until the specified number of bytes has been copied. Overlap is NOT handled correctly. - Copyright (C) 1991, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -62,3 +62,4 @@ memcpy (dstpp, srcpp, len) return dstpp; } +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/generic/memmove.c.jj 2001-08-23 12:49:33.000000000 -0400 +++ libc/sysdeps/generic/memmove.c 2003-04-29 11:13:47.000000000 -0400 @@ -1,6 +1,6 @@ /* Copy memory to memory until the specified number of bytes has been copied. Overlap is handled correctly. - Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 1996, 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -107,3 +107,6 @@ memmove (a1, a2, len) RETURN (dest); } +#ifndef memmove +libc_hidden_builtin_def (memmove) +#endif --- libc/sysdeps/generic/memset.c.jj 2001-08-23 12:49:33.000000000 -0400 +++ libc/sysdeps/generic/memset.c 2003-04-29 10:16:23.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2003 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 @@ -88,3 +88,4 @@ memset (dstpp, c, len) return dstpp; } +libc_hidden_builtin_def (memset) --- libc/sysdeps/generic/strcat.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strcat.c 2003-04-29 10:21:16.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2003 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 @@ -49,3 +49,4 @@ strcat (dest, src) return dest; } +libc_hidden_builtin_def (strcat) --- libc/sysdeps/generic/strchr.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strchr.c 2003-04-29 10:24:47.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,93,94,95,96,97,99,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,94,95,96,97,99,2000,03 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -187,3 +187,4 @@ strchr (s, c_in) #undef index weak_alias (strchr, index) #endif +libc_hidden_builtin_def (strchr) --- libc/sysdeps/generic/strcmp.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strcmp.c 2003-04-29 10:27:36.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1997, 2003 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 @@ -44,3 +44,4 @@ strcmp (p1, p2) return c1 - c2; } +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/generic/strcpy.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strcpy.c 2003-04-29 10:29:19.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2000, 2003 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 @@ -47,3 +47,4 @@ strcpy (dest, src) return dest; } +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/generic/strcspn.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strcspn.c 2003-04-29 10:32:06.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1996, 1997, 2003 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 @@ -48,3 +48,4 @@ strcspn (s, reject) return count; } +libc_hidden_builtin_def (strcspn) --- libc/sysdeps/generic/strlen.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strlen.c 2003-04-29 10:34:17.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1993, 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se); @@ -150,3 +150,4 @@ strlen (str) } } } +libc_hidden_builtin_def (strlen) --- libc/sysdeps/generic/strncmp.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strncmp.c 2003-04-29 10:37:00.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1997, 2003 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 @@ -70,3 +70,4 @@ strncmp (s1, s2, n) return c1 - c2; } +libc_hidden_builtin_def (strncmp) --- libc/sysdeps/generic/strncpy.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strncpy.c 2003-04-29 10:40:44.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2003 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 @@ -84,3 +84,4 @@ strncpy (s1, s2, n) return s; } +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/generic/strpbrk.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strpbrk.c 2003-04-29 10:41:47.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1996, 1997, 2003 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 @@ -43,3 +43,4 @@ strpbrk (s, accept) return NULL; } +libc_hidden_builtin_def (strpbrk) --- libc/sysdeps/generic/strrchr.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strrchr.c 2003-04-29 10:43:33.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 2003 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 @@ -47,3 +47,4 @@ strrchr (const char *s, int c) #undef rindex weak_alias (strrchr, rindex) #endif +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/generic/strspn.c.jj 2001-08-23 12:49:38.000000000 -0400 +++ libc/sysdeps/generic/strspn.c 2003-04-29 10:44:17.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1997, 2003 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 @@ -44,3 +44,4 @@ strspn (s, accept) return count; } +libc_hidden_builtin_def (strspn) --- libc/sysdeps/generic/strstr.c.jj 2001-12-27 14:58:34.000000000 -0500 +++ libc/sysdeps/generic/strstr.c 2003-04-29 10:45:33.000000000 -0400 @@ -1,5 +1,5 @@ /* Return the offset of one string within another. - Copyright (C) 1994, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1994,1996,1997,2000,2001,2003 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 @@ -120,3 +120,4 @@ foundneedle: ret0: return 0; } +libc_hidden_builtin_def (strstr) --- libc/sysdeps/generic/string-inlines.c.jj 2003-04-29 12:27:35.000000000 -0400 +++ libc/sysdeps/generic/string-inlines.c 2003-04-29 12:29:27.000000000 -0400 @@ -0,0 +1,35 @@ +/* Copyright (C) 1999, 2002, 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* and declare some extern inline + functions. These functions are declared additionally here if + inlining is not possible. */ + +#undef __USE_STRING_INLINES +#define __USE_STRING_INLINES +#define _FORCE_INLINES +#define __STRING_INLINE /* empty */ +#define __NO_INLINE__ + +#include +#undef index +#undef rindex + +#undef __NO_INLINE__ +#include +#include --- libc/sysdeps/i386/i486/strcat.S.jj 2001-08-21 16:30:38.000000000 -0400 +++ libc/sysdeps/i386/i486/strcat.S 2003-04-29 10:21:34.000000000 -0400 @@ -1,6 +1,6 @@ /* strcat(dest, src) -- Append SRC on the end of DEST. For Intel 80x86, x>=4. - Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1994,1995,1996,1997,2000,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper . Optimised a little by Alan Modra @@ -267,3 +267,4 @@ L(8): /* GKM FIXME: check high bounds */ LEAVE RET_PTR END (BP_SYM (strcat)) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/i386/i486/strlen.S.jj 2001-08-21 16:30:38.000000000 -0400 +++ libc/sysdeps/i386/i486/strlen.S 2003-04-29 10:35:08.000000000 -0400 @@ -1,6 +1,6 @@ /* strlen(str) -- determine the length of the string STR. Optimized for Intel 80x86, x>=4. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. + Copyright (C) 1991-1997, 2000, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper . This file is part of the GNU C Library. @@ -136,3 +136,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp) LEAVE ret END (BP_SYM (strlen)) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/i386/i486/string-inlines.c.jj 2003-04-29 12:27:35.000000000 -0400 +++ libc/sysdeps/i386/i486/string-inlines.c 2003-04-29 14:18:03.000000000 -0400 @@ -0,0 +1,65 @@ +/* Copyright (C) 1999, 2002, 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* and declare some extern inline + functions. These functions are declared additionally here if + inlining is not possible. */ + +#undef __USE_STRING_INLINES +#define __USE_STRING_INLINES +#define _FORCE_INLINES +#define __STRING_INLINE /* empty */ +#define __NO_INLINE__ + +/* This is to avoid PLT entries for the x86 version. */ +#define __memcpy_g __memcpy_g_internal +#define __strchr_g __strchr_g_internal + +#include +#undef index +#undef rindex + +#undef __NO_INLINE__ +#include +#include + +#ifdef __memcpy_c +# undef __memcpy_g +strong_alias (__memcpy_g_internal, __memcpy_g) +# undef __strchr_g +strong_alias (__strchr_g_internal, __strchr_g) +#endif + +void * +(__memcpy_c) (void *d, const void *s, size_t n) +{ + return memcpy (d, s, n); +} + +void * +__memset_cc (void *s, unsigned long int pattern, size_t n) +{ + return memset (s, pattern & 0xff, n); +} +strong_alias (__memset_cc, __memset_cg) + +void * +__memset_gg (void *s, char c, size_t n) +{ + return memset (s, c, n); +} --- libc/sysdeps/i386/i586/memcpy.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i586/memcpy.S 2003-04-29 10:09:55.000000000 -0400 @@ -1,5 +1,5 @@ /* Highly optimized version for i586. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -116,3 +116,4 @@ L(1): rep; movsb LEAVE RET_PTR END (BP_SYM (memcpy)) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/i386/i586/memset.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i586/memset.S 2003-04-29 10:17:22.000000000 -0400 @@ -1,6 +1,6 @@ /* memset/bzero -- set memory area to CH/0 Highly optimized version for ix86, x>=5. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund, @@ -114,3 +114,4 @@ L(2): shrl $2, %ecx /* convert byte coun RET_PTR #endif END (BP_SYM (memset)) +libc_hidden_builtin_def (memset) --- libc/sysdeps/i386/i586/strchr.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i586/strchr.S 2003-04-29 10:25:42.000000000 -0400 @@ -1,6 +1,6 @@ /* Find character CH in a NUL terminated string. Highly optimized version for ix85, x>=5. - Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . @@ -339,3 +339,4 @@ END (BP_SYM (strchr)) #undef index weak_alias (BP_SYM (strchr), BP_SYM (index)) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/i386/i586/strcpy.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i586/strcpy.S 2003-04-29 10:31:28.000000000 -0400 @@ -1,5 +1,5 @@ /* strcpy/stpcpy implementation for i586. - Copyright (C) 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -159,3 +159,6 @@ L(end2): LEAVE RET_PTR END (BP_SYM (STRCPY)) +#ifndef USE_AS_STPCPY +libc_hidden_builtin_def (strcpy) +#endif --- libc/sysdeps/i386/i586/strlen.S.jj 2002-03-23 05:51:45.000000000 -0500 +++ libc/sysdeps/i386/i586/strlen.S 2003-04-29 10:35:22.000000000 -0400 @@ -1,6 +1,6 @@ /* strlen -- Compute length of NUL terminated string. Highly optimized version for ix86, x>=5. - Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1995,1996,1997,2000,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper, . @@ -186,3 +186,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp) LEAVE ret END (BP_SYM (strlen)) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/i386/i686/memcpy.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i686/memcpy.S 2003-04-29 10:10:04.000000000 -0400 @@ -1,7 +1,7 @@ /* Copy memory block and return pointer to beginning of destination block For Intel 80x86, x>=6. This file is part of the GNU C Library. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1999. The GNU C Library is free software; you can redistribute it and/or @@ -59,3 +59,4 @@ ENTRY (BP_SYM (memcpy)) LEAVE RET_PTR END (BP_SYM (memcpy)) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/i386/i686/memmove.S.jj 2003-02-04 02:51:36.000000000 -0500 +++ libc/sysdeps/i386/i686/memmove.S 2003-04-29 10:13:11.000000000 -0400 @@ -92,3 +92,4 @@ ENTRY (BP_SYM (memmove)) LEAVE RET_PTR END (BP_SYM (memmove)) +libc_hidden_builtin_def (memmove) --- libc/sysdeps/i386/i686/memset.S.jj 2001-08-23 12:49:52.000000000 -0400 +++ libc/sysdeps/i386/i686/memset.S 2003-04-29 10:17:29.000000000 -0400 @@ -1,6 +1,6 @@ /* memset/bzero -- set memory area to CH/0 Highly optimized version for ix86, x>=6. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -93,3 +93,4 @@ ENTRY (BP_SYM (memset)) RET_PTR #endif END (BP_SYM (memset)) +libc_hidden_builtin_def (memset) --- libc/sysdeps/i386/i686/strcmp.S.jj 2002-03-23 05:51:45.000000000 -0500 +++ libc/sysdeps/i386/i686/strcmp.S 2003-04-29 10:27:46.000000000 -0400 @@ -1,5 +1,5 @@ /* Highly optimized version for ix86, x>=6. - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -69,3 +69,4 @@ L(chk): CHECK_BOUNDS_HIGH (%ecx, STR1(%e LEAVE ret END (BP_SYM (strcmp)) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/i386/memchr.S.jj 2001-08-23 12:49:48.000000000 -0400 +++ libc/sysdeps/i386/memchr.S 2003-04-29 10:07:46.000000000 -0400 @@ -1,7 +1,7 @@ /* memchr (str, chr, len) -- Return pointer to first occurrence of CHR in STR less than LEN. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1998, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper Optimised a little by Alan Modra @@ -330,3 +330,4 @@ weak_alias (BP_SYM (__memchr), BP_SYM (m #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/i386/memset.c.jj 2001-08-23 12:49:48.000000000 -0400 +++ libc/sysdeps/i386/memset.c 2003-04-29 10:17:13.000000000 -0400 @@ -1,6 +1,6 @@ /* Set a block of memory to some byte value. For Intel 80x86, x>=3. - Copyright (C) 1991, 1992, 1993, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1993,1997,1998,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -79,6 +79,7 @@ memset (void *dstpp, int c, size_t len) return dstpp; } +libc_hidden_builtin_def (memset) #else #include --- libc/sysdeps/i386/strchr.S.jj 2002-08-12 09:27:53.000000000 -0400 +++ libc/sysdeps/i386/strchr.S 2003-04-29 10:25:28.000000000 -0400 @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1994-1997,1999,2000,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper Some optimisations by Alan Modra @@ -289,3 +289,4 @@ L(6): END (BP_SYM (strchr)) weak_alias (BP_SYM (strchr), BP_SYM (index)) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/i386/strcspn.S.jj 2001-08-23 12:49:49.000000000 -0400 +++ libc/sysdeps/i386/strcspn.S 2003-04-29 10:32:30.000000000 -0400 @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains no characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1994,1995,1996,1997,2000,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper Bug fixes by Alan Modra @@ -179,3 +179,4 @@ L(4): addl $256, %esp /* remove stopset LEAVE ret END (BP_SYM (strcspn)) +libc_hidden_builtin_def (strcspn) --- libc/sysdeps/i386/strlen.c.jj 2001-08-23 12:49:49.000000000 -0400 +++ libc/sysdeps/i386/strlen.c 2003-04-29 10:34:45.000000000 -0400 @@ -1,5 +1,5 @@ /* Determine the length of a string. For Intel 80x86, x>=3. - Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1991,1992,1993,1996,1997,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -33,3 +33,4 @@ strlen (const char *str) return -2 - cnt; } +libc_hidden_builtin_def (strlen) --- libc/sysdeps/i386/strpbrk.S.jj 2001-08-23 12:49:49.000000000 -0400 +++ libc/sysdeps/i386/strpbrk.S 2003-04-29 10:42:14.000000000 -0400 @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segement of STR which contains no characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper Bug fixes by Alan Modra This file is part of the GNU C Library. @@ -188,3 +188,4 @@ L(7): RETURN_BOUNDED_POINTER (STR(%esp)) LEAVE RET_PTR END (BP_SYM (strpbrk)) +libc_hidden_builtin_def (strpbrk) --- libc/sysdeps/i386/strrchr.S.jj 2001-08-23 12:49:49.000000000 -0400 +++ libc/sysdeps/i386/strrchr.S 2003-04-29 10:43:48.000000000 -0400 @@ -1,6 +1,6 @@ /* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper Some optimisations by Alan Modra @@ -331,3 +331,4 @@ L(2): CHECK_BOUNDS_HIGH (%eax, STR(%esp) END (BP_SYM (strrchr)) weak_alias (BP_SYM (strrchr), BP_SYM (rindex)) +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/i386/strspn.S.jj 2001-08-23 12:49:49.000000000 -0400 +++ libc/sysdeps/i386/strspn.S 2003-04-29 10:44:30.000000000 -0400 @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains only characters from SS. For Intel 80x86, x>=3. - Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper Bug fixes by Alan Modra @@ -179,3 +179,4 @@ L(4): addl $256, %esp /* remove stopset LEAVE ret END (BP_SYM (strspn)) +libc_hidden_builtin_def (strspn) --- libc/sysdeps/i386/string-inlines.c.jj 2003-04-29 12:27:35.000000000 -0400 +++ libc/sysdeps/i386/string-inlines.c 2003-04-29 14:08:13.000000000 -0400 @@ -0,0 +1,189 @@ +/* Copyright (C) 1999, 2002, 2003 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 + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* and declare some extern inline + functions. These functions are declared additionally here if + inlining is not possible. */ + +#undef __USE_STRING_INLINES +#define __USE_STRING_INLINES +#define _FORCE_INLINES +#define __STRING_INLINE /* empty */ +#define __NO_INLINE__ + +#include +#undef index +#undef rindex + +#undef __NO_INLINE__ +#include +#include + +/* Functions which are inlines in i486 but not i386. */ +void * +__memcpy_by2 (void *dest, const void *src, size_t n) +{ + return memcpy (dest, src, n); +} +strong_alias (__memcpy_by2, __memcpy_by4) +strong_alias (__memcpy_by2, __memcpy_g) +strong_alias (__memcpy_by2, __memcpy_g_internal) + +void * +__memset_ccn_by2 (void *s, unsigned int c, size_t n) +{ + return memset (s, c & 0xff, n); +} +strong_alias (__memset_ccn_by2, __memset_ccn_by4) + +void * +__memset_gcn_by2 (void *s, int c, size_t n) +{ + return memset (s, c, n); +} +strong_alias (__memset_gcn_by2, __memset_gcn_by4) + +size_t +__strlen_g (const char *s) +{ + return strlen (s); +} + +char * +__strcpy_g (char *d, const char *s) +{ + return strcpy (d, s); +} + +char * +__mempcpy_by2 (char *d, const char *s, size_t n) +{ + return mempcpy (d, s, n); +} +strong_alias (__mempcpy_by2, __mempcpy_by4) +strong_alias (__mempcpy_by2, __mempcpy_byn) + +char * +__stpcpy_g (char *d, const char *s) +{ + return stpcpy (d, s); +} + +char * +__strncpy_by2 (char *d, const char s[], size_t srclen, size_t n) +{ + return strncpy (d, s, n); +} +strong_alias (__strncpy_by2, __strncpy_by4) +strong_alias (__strncpy_by2, __strncpy_byn) + +char * +__strncpy_gg (char *d, const char *s, size_t n) +{ + return strncpy (d, s, n); +} + +char * +__strcat_c (char *d, const char s[], size_t srclen) +{ + return strcat (d, s); +} + +char * +__strcat_g (char *d, const char *s) +{ + return strcat (d, s); +} + +char * +__strncat_g (char *d, const char s[], size_t n) +{ + return strncat (d, s, n); +} + +int +__strcmp_gg (const char *s1, const char *s2) +{ + return strcmp (s1, s2); +} + +int +__strncmp_g (const char *s1, const char *s2, size_t n) +{ + return strncmp (s1, s2, n); +} + +char * +__strrchr_c (const char *s, int c) +{ + return strrchr (s, c >> 8); +} + +char * +__strrchr_g (const char *s, int c) +{ + return strrchr (s, c); +} + +size_t +__strcspn_cg (const char *s, const char reject[], size_t reject_len) +{ + return strcspn (s, reject); +} + +size_t +__strcspn_g (const char *s, const char *reject) +{ + return strcspn (s, reject); +} + +size_t +__strspn_cg (const char *s, const char accept[], size_t accept_len) +{ + return strspn (s, accept); +} + +size_t +__strspn_g (const char *s, const char *accept) +{ + return strspn (s, accept); +} + +char * +__strpbrk_cg (const char *s, const char accept[], size_t accept_len) +{ + return strpbrk (s, accept); +} + +char * +__strpbrk_g (const char *s, const char *accept) +{ + return strpbrk (s, accept); +} + +char * +__strstr_cg (const char *haystack, const char needle[], size_t needle_len) +{ + return strstr (haystack, needle); +} + +char * +__strstr_g (const char *haystack, const char needle[]) +{ + return strstr (haystack, needle); +} --- libc/sysdeps/ia64/memchr.S.jj 2001-08-20 07:27:49.000000000 -0400 +++ libc/sysdeps/ia64/memchr.S 2003-04-29 10:07:53.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard memchr() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -130,3 +130,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/ia64/memcpy.S.jj 2002-10-11 10:24:54.000000000 -0400 +++ libc/sysdeps/ia64/memcpy.S 2003-04-29 10:10:18.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard memcpy() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop for Itanium . Rewritten for McKinley by Sverre Jarp, HP Labs/CERN @@ -409,6 +409,7 @@ ENTRY(memcpy) LOOP(48) LOOP(56) END(memcpy) +libc_hidden_builtin_def (memcpy) .rodata .align 8 --- libc/sysdeps/ia64/memmove.S.jj 2001-08-20 07:27:49.000000000 -0400 +++ libc/sysdeps/ia64/memmove.S 2003-04-29 10:13:19.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard memmove() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -239,3 +239,4 @@ ENTRY(memmove) data8 .loop56 - .loop56 END(memmove) +libc_hidden_builtin_def (memmove) --- libc/sysdeps/ia64/memset.S.jj 2002-10-11 10:24:54.000000000 -0400 +++ libc/sysdeps/ia64/memset.S 2003-04-29 10:17:38.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard memset() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Dan Pop for Itanium . Rewritten for McKinley by Sverre Jarp, HP Labs/CERN @@ -389,4 +389,4 @@ ENTRY(memset) br.ret.sptk.many rp ;; } END(memset) - +libc_hidden_builtin_def (memset) --- libc/sysdeps/ia64/strcat.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strcat.S 2003-04-29 10:21:42.000000000 -0400 @@ -1,6 +1,6 @@ /* IA-64 assembly version of the standard strcat() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -60,3 +60,4 @@ ENTRY(strcat) mov ar.pfs = save_pfs br.ret.sptk.many b0 END(strcat) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/ia64/strchr.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strchr.S 2003-04-29 10:25:50.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strchr() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -109,3 +109,4 @@ ENTRY(strchr) END(strchr) weak_alias(strchr, index) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/ia64/strcmp.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strcmp.S 2003-04-29 10:27:53.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strcmp() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -51,3 +51,4 @@ ENTRY(strcmp) sub ret0 = val1, val2 br.ret.sptk.many b0 END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/ia64/strcpy.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strcpy.S 2003-04-29 10:29:38.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strcpy() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -142,3 +142,4 @@ ENTRY(strcpy) ld8 r[MEMLAT] = [tmp] br.cond.sptk .back3 END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/ia64/strlen.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strlen.S 2003-04-29 10:35:29.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strlen() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -95,3 +95,4 @@ l2: ld8.s val2 = [str], 8 // don't bomb ld8 val2 = [str], 8 // bomb out here br.cond.sptk .back END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/ia64/strncmp.S.jj 2001-08-20 07:27:50.000000000 -0400 +++ libc/sysdeps/ia64/strncmp.S 2003-04-29 10:37:06.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strncmp() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Dan Pop . The GNU C Library is free software; you can redistribute it and/or @@ -59,3 +59,4 @@ ENTRY(strncmp) .restore_and_exit: br.ret.sptk.many b0 END(strncmp) +libc_hidden_builtin_def (strncmp) --- libc/sysdeps/ia64/strncpy.S.jj 2002-12-10 07:39:50.000000000 -0500 +++ libc/sysdeps/ia64/strncpy.S 2003-04-29 10:40:53.000000000 -0400 @@ -1,6 +1,6 @@ /* Optimized version of the standard strncpy() function. This file is part of the GNU C Library. - Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Contributed by Dan Pop and Jakub Jelinek . @@ -229,3 +229,4 @@ ENTRY(strncpy) (p5) mov r[MEMLAT - 1] = r0 br.cond.sptk .back4 END(strncpy) +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/m68k/memchr.S.jj 2001-08-23 12:49:59.000000000 -0400 +++ libc/sysdeps/m68k/memchr.S 2003-04-29 10:08:01.000000000 -0400 @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the first N bytes of STR. For Motorola 68000. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -229,3 +229,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/m68k/strchr.S.jj 2001-08-23 12:49:59.000000000 -0400 +++ libc/sysdeps/m68k/strchr.S 2003-04-29 10:25:57.000000000 -0400 @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For Motorola 68000. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Schwab . @@ -255,3 +255,4 @@ L(L9:) END(strchr) weak_alias (strchr, index) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/mips/mips64/memcpy.S.jj 2003-04-13 16:44:12.000000000 -0400 +++ libc/sysdeps/mips/mips64/memcpy.S 2003-04-29 10:10:27.000000000 -0400 @@ -137,3 +137,4 @@ L(shfth): .set reorder END (memcpy) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/mips/mips64/memset.S.jj 2003-04-13 16:44:12.000000000 -0400 +++ libc/sysdeps/mips/mips64/memset.S 2003-04-29 10:17:42.000000000 -0400 @@ -89,3 +89,4 @@ L(exit): .set reorder END (memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/mips/memcpy.S.jj 2003-03-22 18:32:36.000000000 -0500 +++ libc/sysdeps/mips/memcpy.S 2003-04-29 10:10:23.000000000 -0400 @@ -133,3 +133,4 @@ L(shfth): .set reorder END (memcpy) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/mips/memset.S.jj 2003-03-22 18:32:36.000000000 -0500 +++ libc/sysdeps/mips/memset.S 2003-04-29 10:17:45.000000000 -0400 @@ -83,3 +83,4 @@ L(exit): .set reorder END (memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/powerpc/powerpc32/memset.S.jj 2003-03-20 05:58:53.000000000 -0500 +++ libc/sysdeps/powerpc/powerpc32/memset.S 2003-04-29 10:17:49.000000000 -0400 @@ -332,3 +332,4 @@ L(handletail32): b L(nondcbz) END (BP_SYM (memset)) +libc_hidden_builtin_def (memset) --- libc/sysdeps/powerpc/powerpc32/strchr.S.jj 2002-09-05 04:26:52.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc32/strchr.S 2003-04-29 10:26:11.000000000 -0400 @@ -1,5 +1,5 @@ /* Optimized strchr implementation for PowerPC. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2003 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 @@ -128,3 +128,4 @@ L(foundit): END (BP_SYM (strchr)) weak_alias (BP_SYM (strchr), BP_SYM (index)) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/powerpc/powerpc32/strcmp.S.jj 2002-09-05 04:27:07.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc32/strcmp.S 2003-04-29 10:28:02.000000000 -0400 @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2003 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 @@ -124,3 +124,4 @@ L(u4): lbz rWORD1, -1(rSTR1) /* GKM FIXME: check high bounds. */ blr END (BP_SYM (strcmp)) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/powerpc/powerpc32/strcpy.S.jj 2002-09-05 04:27:23.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc32/strcpy.S 2003-04-29 10:29:45.000000000 -0400 @@ -1,5 +1,5 @@ /* Optimized strcpy implementation for PowerPC. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2003 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 @@ -118,3 +118,4 @@ L(u1): stb rALT, 1(rDEST) blr END (BP_SYM (strcpy)) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/powerpc/powerpc32/strlen.S.jj 2002-09-05 04:27:34.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc32/strlen.S 2003-04-29 10:35:39.000000000 -0400 @@ -1,5 +1,5 @@ /* Optimized strlen implementation for PowerPC. - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000, 2003 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 @@ -157,3 +157,4 @@ L(done0): /* GKM FIXME: check high bound. */ blr END (BP_SYM (strlen)) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/powerpc/powerpc64/memcpy.S.jj 2003-03-18 17:58:31.000000000 -0500 +++ libc/sysdeps/powerpc/powerpc64/memcpy.S 2003-04-29 10:10:46.000000000 -0400 @@ -208,3 +208,4 @@ EALIGN (BP_SYM (memcpy), 5, 0) std 0,8(4) b .L8 END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/powerpc/powerpc64/memset.S.jj 2003-03-20 05:58:53.000000000 -0500 +++ libc/sysdeps/powerpc/powerpc64/memset.S 2003-04-29 10:18:02.000000000 -0400 @@ -269,6 +269,7 @@ L(medium_28t): std rCHR, -8(rMEMP) blr END_GEN_TB (BP_SYM (memset),TB_TOCLESS) +libc_hidden_builtin_def (memset) /* Copied from bzero.S to prevent the linker from inserting a stub between bzero and memset. */ --- libc/sysdeps/powerpc/powerpc64/strchr.S.jj 2003-04-13 16:44:12.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc64/strchr.S 2003-04-29 10:26:20.000000000 -0400 @@ -138,3 +138,4 @@ L(foundit): END (BP_SYM (strchr)) weak_alias (BP_SYM (strchr), BP_SYM (index)) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/powerpc/powerpc64/strcmp.S.jj 2003-04-23 14:11:55.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc64/strcmp.S 2003-04-29 10:28:06.000000000 -0400 @@ -144,3 +144,4 @@ L(u4): lbz rWORD1, -1(rSTR1) /* GKM FIXME: check high bounds. */ blr END (BP_SYM (strcmp)) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/powerpc/powerpc64/strcpy.S.jj 2003-04-23 14:11:55.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc64/strcpy.S 2003-04-29 10:29:49.000000000 -0400 @@ -141,3 +141,4 @@ L(u1): stb rALT, 1(rDEST) blr END (BP_SYM (strcpy)) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/powerpc/powerpc64/strlen.S.jj 2003-04-13 16:44:13.000000000 -0400 +++ libc/sysdeps/powerpc/powerpc64/strlen.S 2003-04-29 10:35:43.000000000 -0400 @@ -171,3 +171,4 @@ L(done0): /* GKM FIXME: check high bound. */ blr END (BP_SYM (strlen)) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/powerpc/strcat.c.jj 2001-08-23 12:50:13.000000000 -0400 +++ libc/sysdeps/powerpc/strcat.c 2003-04-29 10:22:13.000000000 -0400 @@ -1,5 +1,5 @@ /* strcat version that uses fast strcpy/strlen. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2003 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 @@ -28,3 +28,4 @@ strcat (char *dest, const char *src) strcpy (dest + strlen (dest), src); return dest; } +libc_hidden_builtin_def (strcat) --- libc/sysdeps/sparc/sparc32/memchr.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/memchr.S 2003-04-29 10:08:09.000000000 -0400 @@ -144,3 +144,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/sparc/sparc32/memcpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/memcpy.S 2003-04-29 10:13:47.000000000 -0400 @@ -966,3 +966,5 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=le 110: retl sub %o7, %g6, %o5 END(memcpy) +libc_hidden_builtin_def (memcpy) +libc_hidden_builtin_def (memmove) --- libc/sysdeps/sparc/sparc32/memset.S.jj 2001-08-23 12:50:21.000000000 -0400 +++ libc/sysdeps/sparc/sparc32/memset.S 2003-04-29 10:18:13.000000000 -0400 @@ -1,6 +1,6 @@ /* Set a block of memory to some byte value. For SPARC v7. - Copyright (C) 1996, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller and Jakub Jelinek . @@ -150,5 +150,6 @@ ENTRY(memset) 0: retl nop END(memset) +libc_hidden_builtin_def (memset) weak_alias(__bzero, bzero) --- libc/sysdeps/sparc/sparc32/strcat.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/strcat.S 2003-04-29 10:22:20.000000000 -0400 @@ -346,3 +346,4 @@ ENTRY(strcat) retl mov %g2, %o0 END(strcat) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/sparc/sparc32/strchr.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/strchr.S 2003-04-29 10:26:30.000000000 -0400 @@ -280,3 +280,5 @@ END(strrchr) weak_alias(strchr, index) weak_alias(strrchr, rindex) +libc_hidden_builtin_def (strchr) +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/sparc/sparc32/strcmp.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/strcmp.S 2003-04-29 10:28:11.000000000 -0400 @@ -255,3 +255,4 @@ ENTRY(strcmp) jmpl %i7 + 8, %g0 restore %g4, %g0, %o0 END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/sparc/sparc32/strcpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc32/strcpy.S 2003-04-29 10:29:52.000000000 -0400 @@ -272,3 +272,4 @@ ENTRY(strcpy) retl mov %g2, %o0 END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/sparc/sparc32/strlen.S.jj 2001-08-23 12:50:21.000000000 -0400 +++ libc/sysdeps/sparc/sparc32/strlen.S 2003-04-29 10:35:49.000000000 -0400 @@ -1,6 +1,6 @@ /* Determine the length of a string. For SPARC v7. - Copyright (C) 1996, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek . @@ -101,3 +101,4 @@ ENTRY(strlen) 13: retl sub %o4, %o1, %o0 END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/sparc/sparc64/sparcv9b/memcpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/sparcv9b/memcpy.S 2003-04-29 10:11:42.000000000 -0400 @@ -711,3 +711,5 @@ weak_alias(memcpy, __align_cpy_4) weak_alias(memcpy, __align_cpy_8) weak_alias(memcpy, __align_cpy_16) #endif +libc_hidden_builtin_def (memcpy) +libc_hidden_builtin_def (memmove) --- libc/sysdeps/sparc/sparc64/memchr.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/memchr.S 2003-04-29 10:08:26.000000000 -0400 @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less than N. For SPARC v9. - Copyright (C) 1998,1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jan Vondrak and Jakub Jelinek . @@ -260,3 +260,4 @@ weak_alias (__memchr, memchr) #if !__BOUNDED_POINTERS__ weak_alias (__memchr, __ubp_memchr) #endif +libc_hidden_builtin_def (memchr) --- libc/sysdeps/sparc/sparc64/memcpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/memcpy.S 2003-04-29 10:11:29.000000000 -0400 @@ -917,3 +917,5 @@ END(memmove) weak_alias(memcpy, __align_cpy_1) weak_alias(memcpy, __align_cpy_2) #endif +libc_hidden_builtin_def (memcpy) +libc_hidden_builtin_def (memmove) --- libc/sysdeps/sparc/sparc64/memset.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/memset.S 2003-04-29 10:18:31.000000000 -0400 @@ -1,6 +1,6 @@ /* Set a block of memory to some byte value. For UltraSPARC. - Copyright (C) 1996, 97, 98, 99 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller (davem@caip.rutgers.edu) and Jakub Jelinek (jj@ultra.linux.cz). @@ -178,6 +178,7 @@ ENTRY(memset) ba,pt %xcc, 18b ldd [%o0], %f0 END(memset) +libc_hidden_builtin_def (memset) #define ZERO_BLOCKS(base, offset, source) \ stx source, [base - offset - 0x38]; \ --- libc/sysdeps/sparc/sparc64/strcat.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strcat.S 2003-04-29 10:22:26.000000000 -0400 @@ -337,3 +337,4 @@ ENTRY(strcat) retl /* CTI+IEU1 Group */ mov %g6, %o0 /* IEU0 */ END(strcat) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/sparc/sparc64/strchr.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strchr.S 2003-04-29 10:26:38.000000000 -0400 @@ -479,3 +479,5 @@ END(strrchr) weak_alias (strchr, index) weak_alias (strrchr, rindex) +libc_hidden_builtin_def (strchr) +libc_hidden_builtin_def (strrchr) --- libc/sysdeps/sparc/sparc64/strcmp.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strcmp.S 2003-04-29 10:28:15.000000000 -0400 @@ -277,3 +277,4 @@ ENTRY(strcmp) ba,pt %xcc, 11b /* CTI Group */ ldxa [%o1 + %o0] ASI_PNF, %g6 /* Load */ END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/sparc/sparc64/strcpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strcpy.S 2003-04-29 10:29:56.000000000 -0400 @@ -242,3 +242,4 @@ ENTRY(strcpy) retl /* CTI+IEU1 Group */ mov %g6, %o0 /* IEU0 */ END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/sparc/sparc64/strcspn.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/strcspn.S 2003-04-29 10:32:52.000000000 -0400 @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains no characters from SS. For SPARC v9. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek @@ -210,3 +210,4 @@ ENTRY(strcspn) retl /* CTI+IEU1 Group */ sub %o0, %g4, %o0 /* IEU0 */ END(strcspn) +libc_hidden_builtin_def (strcspn) --- libc/sysdeps/sparc/sparc64/strlen.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/strlen.S 2003-04-29 10:35:58.000000000 -0400 @@ -1,5 +1,5 @@ /* Determine the length of a string. For SPARC v9. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jan Vondrak and Jakub Jelinek . @@ -171,3 +171,4 @@ ENTRY(strlen) retl /* CTI+IEU1 Group */ sub %o0, %o1, %o0 /* IEU0 */ END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/sparc/sparc64/strncmp.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strncmp.S 2003-04-29 10:37:12.000000000 -0400 @@ -361,3 +361,4 @@ ENTRY(strncmp) ba,pt %xcc, 13b /* CTI */ add %o1, 8, %o1 /* IEU0 */ END(strncmp) +libc_hidden_builtin_def (strncmp) --- libc/sysdeps/sparc/sparc64/strncpy.S.jj 2003-01-30 05:01:49.000000000 -0500 +++ libc/sysdeps/sparc/sparc64/strncpy.S 2003-04-29 10:41:00.000000000 -0400 @@ -394,3 +394,4 @@ ENTRY(strncpy) ba,pt %xcc, 3b /* CTI */ sllx %o4, 56, %g3 /* IEU0 Group */ END(strncpy) +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/sparc/sparc64/strpbrk.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/strpbrk.S 2003-04-29 10:42:22.000000000 -0400 @@ -1,7 +1,7 @@ /* strpbrk (s, accept) -- Find the first occurrence in S of any character in ACCEPT. For SPARC v9. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek @@ -228,3 +228,4 @@ ENTRY(strpbrk) movrz %g1, 0, %o0 /* Single Group */ END(strpbrk) +libc_hidden_builtin_def (strpbrk) --- libc/sysdeps/sparc/sparc64/strspn.S.jj 2001-08-23 12:50:22.000000000 -0400 +++ libc/sysdeps/sparc/sparc64/strspn.S 2003-04-29 10:44:39.000000000 -0400 @@ -1,7 +1,7 @@ /* strspn (str, ss) -- Return the length of the maximum initial segment of S which contains only characters in ACCEPT. For SPARC v9. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek @@ -210,3 +210,4 @@ ENTRY(strspn) retl /* CTI+IEU1 Group */ sub %o0, %g4, %o0 /* IEU0 */ END(strspn) +libc_hidden_builtin_def (strspn) --- libc/sysdeps/sh/memcpy.S.jj 2003-01-03 08:06:58.000000000 -0500 +++ libc/sysdeps/sh/memcpy.S 2003-04-29 10:11:51.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima Optimized by Toshiyasu Morita @@ -197,3 +197,4 @@ L_exit: rts mov r3,r0 /* Return destination. */ END(memcpy) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/sh/memset.S.jj 2003-01-03 08:06:58.000000000 -0500 +++ libc/sysdeps/sh/memset.S 2003-04-29 10:18:38.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima Optimized by Toshiyasu Morita @@ -85,3 +85,4 @@ L_byte_exit: rts mov r7,r0 END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/sh/strlen.S.jj 2001-08-23 12:50:19.000000000 -0400 +++ libc/sysdeps/sh/strlen.S 2003-04-29 10:36:05.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kazumoto Kojima @@ -82,3 +82,4 @@ ENTRY(strlen) rts mov r2, r0 END(strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/s390/s390-32/memchr.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/memchr.S 2003-04-29 10:08:37.000000000 -0400 @@ -1,5 +1,5 @@ /* Search a character in a block of memory. For IBM S390 - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -39,3 +39,4 @@ ENTRY(memchr) slr %r2,%r2 1: br %r14 END(memchr) +libc_hidden_builtin_def (memchr) --- libc/sysdeps/s390/s390-32/memcpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/memcpy.S 2003-04-29 10:12:02.000000000 -0400 @@ -1,5 +1,5 @@ /* memcpy - copy a block from source to destination. S/390 version. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -56,4 +56,4 @@ ENTRY(memcpy) lr %r2,%r1 # return destination address br %r14 END(memcpy) - +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/s390/s390-32/memset.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/memset.S 2003-04-29 10:18:45.000000000 -0400 @@ -1,5 +1,5 @@ /* Set a block of memory to some byte value. For IBM S390 - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -42,3 +42,4 @@ ENTRY(memset) .L1: br %r14 END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/s390/s390-32/strcmp.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/strcmp.S 2003-04-29 10:28:24.000000000 -0400 @@ -1,6 +1,6 @@ /* strcmp - compare two string. S/390 version. This file is part of the GNU C Library. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -39,3 +39,4 @@ ENTRY(strcmp) 2: lhi %r2,-1 br %r14 END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/s390/s390-32/strcpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/strcpy.S 2003-04-29 10:30:04.000000000 -0400 @@ -1,6 +1,6 @@ /* strcpy - copy a string from source to destination. For IBM S390 This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -34,3 +34,4 @@ ENTRY(strcpy) jo 0b br %r14 END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/s390/s390-32/strncpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-32/strncpy.S 2003-04-29 10:41:07.000000000 -0400 @@ -1,7 +1,7 @@ /* strncpy - copy at most n characters from a string from source to destination. For IBM S390 This file is part of the GNU C Library. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -77,3 +77,4 @@ ENTRY(strncpy) .Lexit: l %r2,24(%r15) # return dst pointer br %r14 END(strncpy) +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/s390/s390-64/memchr.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/memchr.S 2003-04-29 10:08:45.000000000 -0400 @@ -1,5 +1,5 @@ /* Search a character in a block of memory. 64 bit S/390 version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -38,3 +38,4 @@ ENTRY(memchr) slgr %r2,%r2 1: br %r14 END(memchr) +libc_hidden_builtin_def (memchr) --- libc/sysdeps/s390/s390-64/memcpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/memcpy.S 2003-04-29 10:12:13.000000000 -0400 @@ -1,5 +1,5 @@ /* memcpy - copy a block from source to destination. 64 bit S/390 version. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -55,4 +55,4 @@ ENTRY(memcpy) lgr %r2,%r1 # return destination address br %r14 END(memcpy) - +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/s390/s390-64/memset.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/memset.S 2003-04-29 10:18:51.000000000 -0400 @@ -1,5 +1,5 @@ /* Set a block of memory to some byte value. 64 bit S/390 version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -41,3 +41,4 @@ ENTRY(memset) .L1: br %r14 END(memset) +libc_hidden_builtin_def (memset) --- libc/sysdeps/s390/s390-64/strcmp.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/strcmp.S 2003-04-29 10:28:30.000000000 -0400 @@ -1,6 +1,6 @@ /* strcmp - compare two string. 64 bit S/390 version. This file is part of the GNU C Library. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). The GNU C Library is free software; you can redistribute it and/or @@ -39,3 +39,4 @@ ENTRY(strcmp) 2: lghi %r2,-1 br %r14 END(strcmp) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/s390/s390-64/strcpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/strcpy.S 2003-04-29 10:30:11.000000000 -0400 @@ -1,5 +1,5 @@ /* strcpy - copy a string from source to destination. 64 bit S/390 version. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -33,3 +33,4 @@ ENTRY(strcpy) jo 0b br %r14 END(strcpy) +libc_hidden_builtin_def (strcpy) --- libc/sysdeps/s390/s390-64/strncpy.S.jj 2001-08-23 12:50:18.000000000 -0400 +++ libc/sysdeps/s390/s390-64/strncpy.S 2003-04-29 10:41:13.000000000 -0400 @@ -1,6 +1,6 @@ /* strncpy - copy at most n characters from a string from source to destination. 64 bit S/390 version - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -88,3 +88,4 @@ ENTRY(strncpy) .Lexit: lg %r2,48(%r15) # return dst pointer br %r14 END(strncpy) +libc_hidden_builtin_def (strncpy) --- libc/sysdeps/x86_64/memcpy.S.jj 2002-08-31 13:33:34.000000000 -0400 +++ libc/sysdeps/x86_64/memcpy.S 2003-04-29 10:12:23.000000000 -0400 @@ -1,5 +1,5 @@ /* Highly optimized version for x86-64. - Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on i586 version contributed by Ulrich Drepper , 1997. @@ -90,3 +90,4 @@ ENTRY (BP_SYM (memcpy)) ret END (BP_SYM (memcpy)) +libc_hidden_builtin_def (memcpy) --- libc/sysdeps/x86_64/memset.S.jj 2002-08-31 13:42:25.000000000 -0400 +++ libc/sysdeps/x86_64/memset.S 2003-04-29 10:20:31.000000000 -0400 @@ -1,6 +1,6 @@ /* memset/bzero -- set memory area to CH/0 Optimized version for x86-64. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger . @@ -129,3 +129,6 @@ ENTRY (memset) jmp 4b END (memset) +#if !BZERO_P +libc_hidden_builtin_def (memset) +#endif --- libc/sysdeps/x86_64/strcat.S.jj 2002-11-15 03:59:04.000000000 -0500 +++ libc/sysdeps/x86_64/strcat.S 2003-04-29 10:22:40.000000000 -0400 @@ -257,3 +257,4 @@ ENTRY (BP_SYM (strcat)) movq %rdi, %rax /* Source is return value. */ retq END (BP_SYM (strcat)) +libc_hidden_builtin_def (strcat) --- libc/sysdeps/x86_64/strchr.S.jj 2002-11-15 03:59:04.000000000 -0500 +++ libc/sysdeps/x86_64/strchr.S 2003-04-29 10:26:47.000000000 -0400 @@ -288,3 +288,4 @@ ENTRY (BP_SYM (strchr)) END (BP_SYM (strchr)) weak_alias (BP_SYM (strchr), BP_SYM (index)) +libc_hidden_builtin_def (strchr) --- libc/sysdeps/x86_64/strcmp.S.jj 2002-08-31 13:41:24.000000000 -0400 +++ libc/sysdeps/x86_64/strcmp.S 2003-04-29 10:28:39.000000000 -0400 @@ -1,5 +1,5 @@ /* Highly optimized version for x86-64. - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on i686 version contributed by Ulrich Drepper , 1999. @@ -42,3 +42,4 @@ L(neq): movl $1, %eax cmovbl %ecx, %eax ret END (BP_SYM (strcmp)) +libc_hidden_builtin_def (strcmp) --- libc/sysdeps/x86_64/strcpy.S.jj 2002-08-31 13:41:24.000000000 -0400 +++ libc/sysdeps/x86_64/strcpy.S 2003-04-29 10:30:53.000000000 -0400 @@ -154,3 +154,6 @@ ENTRY (BP_SYM (STRCPY)) #endif retq END (BP_SYM (STRCPY)) +#ifndef USE_AS_STPCPY +libc_hidden_builtin_def (strcpy) +#endif --- libc/sysdeps/x86_64/strcspn.S.jj 2002-08-31 13:41:24.000000000 -0400 +++ libc/sysdeps/x86_64/strcspn.S 2003-04-29 10:33:13.000000000 -0400 @@ -1,7 +1,7 @@ /* strcspn (str, ss) -- Return the length of the initial segment of STR which contains no characters from SS. For AMD x86-64. - Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper . Bug fixes by Alan Modra . @@ -121,3 +121,4 @@ L(4): addq $256, %rsp /* remove skipset #endif ret END (strcspn) +libc_hidden_builtin_def (strcspn) --- libc/sysdeps/x86_64/strlen.S.jj 2002-08-31 13:41:24.000000000 -0400 +++ libc/sysdeps/x86_64/strlen.S 2003-04-29 10:36:17.000000000 -0400 @@ -1,5 +1,5 @@ /* strlen(str) -- determine the length of the string STR. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. Based on i486 version contributed by Ulrich Drepper . This file is part of the GNU C Library. @@ -136,3 +136,4 @@ ENTRY (strlen) subq %rdi, %rax /* compute difference to string start */ ret END (strlen) +libc_hidden_builtin_def (strlen) --- libc/sysdeps/x86_64/strspn.S.jj 2002-08-31 13:41:24.000000000 -0400 +++ libc/sysdeps/x86_64/strspn.S 2003-04-29 10:44:54.000000000 -0400 @@ -1,7 +1,7 @@ /* strspn (str, ss) -- Return the length of the initial segment of STR which contains only characters from SS. For AMD x86-64. - Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1994-1997, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper . Bug fixes by Alan Modra . @@ -111,3 +111,4 @@ L(4): addq $256, %rsp /* remove stopset non-valid character */ ret END (strspn) +libc_hidden_builtin_def (strspn) --- libc/configure.in.jj 2003-04-23 14:11:49.000000000 -0400 +++ libc/configure.in 2003-04-29 09:25:26.000000000 -0400 @@ -1384,8 +1384,8 @@ dnl AC_CHECK_ASM_UNDERSCORE([ACTION-IF-F AC_DEFUN(AC_CHECK_ASM_UNDERSCORE, [cat > conftest.$ac_ext < conftest.c < conftest.c < conftest.c <<\EOF +extern char *strstr (const char *, const char *) __asm ("my_strstr"); +char *foo (const char *a, const char *b) +{ + return __builtin_strstr (a, b); +} +EOF +dnl +if AC_TRY_COMMAND([${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null]); +then + libc_cv_gcc_builtin_redirection=yes +else + libc_cv_gcc_builtin_redirection=no +fi +rm -f conftest* ]) +if test "$libc_cv_gcc_builtin_redirection" = yes ; then + AC_DEFINE(HAVE_BUILTIN_REDIRECTION) +fi + dnl Check whether the compiler supports subtraction of local labels. AC_CACHE_CHECK(for local label subtraction, libc_cv_gcc_subtract_local_labels, [cat > conftest.c <&6 else cat > conftest.$ac_ext <&6 else cat > conftest.c <&6 else cat > conftest.c <&5 +echo $ECHO_N "checking for redirection of built-in functions... $ECHO_C" >&6 +if test "${libc_cv_gcc_builtin_redirection+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat > conftest.c <<\EOF +extern char *strstr (const char *, const char *) __asm ("my_strstr"); +char *foo (const char *a, const char *b) +{ + return __builtin_strstr (a, b); +} +EOF +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; +then + libc_cv_gcc_builtin_redirection=yes +else + libc_cv_gcc_builtin_redirection=no +fi +rm -f conftest* +fi +echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_redirection" >&5 +echo "${ECHO_T}$libc_cv_gcc_builtin_redirection" >&6 +if test "$libc_cv_gcc_builtin_redirection" = yes ; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_BUILTIN_REDIRECTION 1 +_ACEOF + +fi + echo "$as_me:$LINENO: checking for local label subtraction" >&5 echo $ECHO_N "checking for local label subtraction... $ECHO_C" >&6 if test "${libc_cv_gcc_subtract_local_labels+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.c < - __memcpy_by2; __memcpy_by4; __memcpy_g; __mempcpy_by2; __mempcpy_by4; - __mempcpy_byn; __memset_ccn_by2; __memset_ccn_by4; __memset_gcn_by2; - __memset_gcn_by4; __stpcpy_g; __strcat_c; __strcat_g; __strchr_c; - __strchr_g; __strchrnul_c; __strchrnul_g; __strcmp_gg; __strcpy_g; - __strcspn_c1; __strcspn_cg; __strcspn_g; __strlen_g; __strncat_g; - __strncmp_g; __strncpy_by2; __strncpy_by4; __strncpy_byn; __strncpy_gg; - __strpbrk_cg; __strpbrk_g; __strrchr_c; __strrchr_g; __strspn_c1; - __strspn_cg; __strspn_g; __strstr_cg; __strstr_g; - } -} --- libc/sysdeps/i386/Versions.jj 1999-05-17 13:23:56.000000000 -0400 +++ libc/sysdeps/i386/Versions 2003-04-29 16:44:49.000000000 -0400 @@ -9,7 +9,14 @@ libc { } GLIBC_2.1.1 { # extern inline functions used by - __memcpy_c; __memset_cc; __memset_cg; __memset_gg; __strchr_c; __strchr_g; - __strchrnul_c; __strchrnul_g; + __memcpy_c; __memset_cc; __memset_cg; __memset_gg; + __memcpy_by2; __memcpy_by4; __memcpy_g; __mempcpy_by2; __mempcpy_by4; + __mempcpy_byn; __memset_ccn_by2; __memset_ccn_by4; __memset_gcn_by2; + __memset_gcn_by4; __stpcpy_g; __strcat_c; __strcat_g; __strchr_c; + __strchr_g; __strchrnul_c; __strchrnul_g; __strcmp_gg; __strcpy_g; + __strcspn_c1; __strcspn_cg; __strcspn_g; __strlen_g; __strncat_g; + __strncmp_g; __strncpy_by2; __strncpy_by4; __strncpy_byn; __strncpy_gg; + __strpbrk_cg; __strpbrk_g; __strrchr_c; __strrchr_g; __strspn_c1; + __strspn_cg; __strspn_g; __strstr_cg; __strstr_g; } } Jakub From drepper@redhat.com Tue Apr 29 22:57:00 2003 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 29 Apr 2003 22:57:00 -0000 Subject: [PATCH] libc_hidden_builtin_* In-Reply-To: <20030429210734.GI16629@sunsite.ms.mff.cuni.cz> References: <20030429210734.GI16629@sunsite.ms.mff.cuni.cz> Message-ID: <3EAF0332.2010401@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks, I've applied the two patches. - -- - --------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `--------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+rwMy2ijCOnn/RHQRAmUtAKC3WlSNsE0QK4vMGOpJ+1M7ypcnAwCgrq5y mRdQXNZi6tlJP7FFYB0LliA= =toGs -----END PGP SIGNATURE-----