summaryrefslogtreecommitdiff
path: root/sysdeps/generic
Commit message (Collapse)AuthorAgeFilesLines
* Use STB_SECONDARY on pthread functions in libchjl/pthread/2.21H.J. Lu2015-09-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use STB_SECONDARY binding on pthread functions in libc so that they will be preempted by definitions in libpthread at link-time as well as at run-time. * csu/libc-tls.c (__pthread_initialize_minimal): Mark it secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined. * misc/error.c (error): Replace pthread_setcancelstate with __pthread_setcancelstate. (error_at_line): Likewise. * posix/wordexp.c (parse_comm): Likewise. * stdlib/fmtmsg.c (fmtmsg): Likewise. * nptl/Makefile: Include ../Makeconfig. (libc-libpthread-routines): New macro. (libc-libpthread-static-only-routines): Likewise. (static-only-routines): Add $(libc-libpthread-static-only-routines) if $(have-secondary) is yes. (routines): Add $(libc-libpthread-routines) if $(have-secondary) is yes. (CFLAGS-libc-pthread_unwind.c): New. * nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0): Add _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer, __pthread_getspecific, __pthread_setspecific, __pthread_key_create, pthread_once, __pthread_once, __pthread_mutex_lock and __pthread_mutex_unlock. [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.2): Add __pthread_rwlock_init, __pthread_rwlock_destroy, __pthread_rwlock_rdlock, __pthread_rwlock_wrlock and __pthread_rwlock_unlock. [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add __pthread_unwind and __pthread_setcancelstate. [HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE): Add __pthread_setcancelstate. * nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New. (FORWARD_NORETURN): Likewise. (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. Don't define if (__pthread_unwind): Don't define if HAVE_ASM_SECONDARY_DIRECTIVE is defined. * nptl/libc-cleanup_defer_compat.c: New file. * nptl/libc-pthread_getspecific.c: Likewise. * nptl/libc-pthread_key_create.c: Likewise. * nptl/libc-pthread_mutex_lock.c: Likewise. * nptl/libc-pthread_mutex_unlock.c: Likewise. * nptl/libc-pthread_once.c: Likewise. * nptl/libc-pthread_rwlock_destroy.c: Likewise. * nptl/libc-pthread_rwlock_init.c: Likewise. * nptl/libc-pthread_rwlock_rdlock.c: Likewise. * nptl/libc-pthread_rwlock_unlock.c: Likewise. * nptl/libc-pthread_rwlock_wrlock.c: Likewise. * nptl/libc-pthread_setcancelstate.c: Likewise. * nptl/libc-pthread_setspecific.c: Likewise. * nptl/libc-pthread_unwind.c: Likewise. * nptl/nptl-init.c (pthread_functions): Don't include secondary pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is defined. Replace ptr_pthread_setcancelstate with ptr___pthread_setcancelstate. * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise. * nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if HAVE_ASM_SECONDARY_DIRECTIVE is defined. (__pthread_cond_broadcast_2_0): Declare only if not in libc. (__pthread_cond_destroy_2_0): Likewise. (__pthread_cond_init_2_0): Likewise. (__pthread_cond_signal_2_0): Likewise. (__pthread_cond_timedwait_2_0): Likewise. (__pthread_cond_wait_2_0): Likewise. * scripts/abilist.awk: Support secondary symbols. * sysdeps/generic/localplt.data: Allow pthread functions. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/localplt.data: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if HAVE_ASM_SECONDARY_DIRECTIVE is defined. (__libc_maybe_call): Always call FUNC if HAVE_ASM_SECONDARY_DIRECTIVE is defined. (__libc_ptf_call): Likewise. (__libc_ptf_call_always): Likewise. (__pthread_mutex_init): Don't mark it weak if HAVE_ASM_SECONDARY_DIRECTIVE is defined. (__pthread_mutex_destroy): Likewise. (__pthread_mutex_lock): Likewise. (__pthread_mutex_trylock): Likewise. (__pthread_mutex_unlock): Likewise. (__pthread_mutexattr_init): Likewise. (__pthread_mutexattr_destroy): Likewise. (__pthread_mutexattr_settype): Likewise. (__pthread_rwlock_destroy): Likewise. (__pthread_rwlock_rdlock): Likewise. (__pthread_rwlock_tryrdlock): Likewise. (__pthread_rwlock_wrlock): Likewise. (__pthread_rwlock_trywrlock): Likewise. (__pthread_rwlock_unlock): Likewise. (__pthread_key_create): Likewise. (__pthread_setspecific): Likewise. (__pthread_getspecific): Likewise. (__pthread_once): Likewise. (__pthread_initialize): Likewise. (__pthread_atfork): Likewise. (_pthread_cleanup_push_defer): Likewise. (_pthread_cleanup_pop_restore): Likewise. (__pthread_setcancelstate): New prototype. (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. Don't mark it weak if HAVE_ASM_SECONDARY_DIRECTIVE is defined. * sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind): Likewise. * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is defined. Replace pthread_setcancelstate with __pthread_setcancelstate. * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make __lll_lock_wait_private and __lll_unlock_wake_private weak in libc.a. * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
* Fix recursive dlopen.Carlos O'Donell2015-01-211-2/+2
| | | | | | | | | | | | | | | | | | | The ability to recursively call dlopen is useful for malloc implementations that wish to load other dynamic modules that implement reentrant/AS-safe functions to use in their own implementation. Given that a user malloc implementation may be called by an ongoing dlopen to allocate memory the user malloc implementation interrupts dlopen and if it calls dlopen again that's a reentrant call. This patch fixes the issues with the ld.so.cache mapping and the _r_debug assertion which prevent this from working as expected. See: https://sourceware.org/ml/libc-alpha/2014-12/msg00446.html
* Clean up allocrtsig code.Roland McGrath2015-01-081-27/+0
|
* Fix libm feupdateenv namespace (bug 17748).Joseph Myers2015-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Concluding the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of feupdateenv by making it a weak alias for __feupdateenv and making the affected code call __feupdateenv. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). Also tested for ARM (soft-float) that the math.h linknamespace tests now pass. [BZ #17748] * include/fenv.h (__feupdateenv): Use libm_hidden_proto. * math/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/arm/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Rename to __feupdateenv and define as weak alias of __feupdateenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__feupdateenv): New inline function. * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Use libm_hidden_def. * sysdeps/generic/math_private.h (default_libc_feupdateenv): Call __feupdateenv instead of feupdateenv. (default_libc_feupdateenv_test): Likewise. (libc_feresetround_ctx): Likewise.
* Fix libm fesetround namespace (bug 17748).Joseph Myers2015-01-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fesetround by making it a weak alias of __fesetround and making the affected code call __fesetround. An existing __fesetround function in fenv_libc.h for powerpc is renamed to __fesetround_inline. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fesetround failures disappear from the linknamespace test results (feupdateenv remains to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__fesetround): Declare. Use libm_hidden_proto. * math/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/aarch64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/alpha/fpu/fesetround.c (fesetround): Likewise. * sysdeps/arm/fesetround.c (fesetround): Likewise. * sysdeps/hppa/fpu/fesetround.c (fesetround): Likewise. * sysdeps/i386/fpu/fesetround.c (fesetround): Likewise. * sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise. * sysdeps/m68k/fpu/fesetround.c (fesetround): Likewise. * sysdeps/mips/fpu/fesetround.c (fesetround): Likewise. * sysdeps/powerpc/fpu/fenv_libc.h (__fesetround): Rename to __fesetround_inline. * sysdeps/powerpc/fpu/fenv_private.h (libc_fesetround_ppc): Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. Call __fesetround_inline instead of __fesetround. * sysdeps/powerpc/nofpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c (fesetround): Likewise. * sysdeps/s390/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise. * sysdeps/sparc/fpu/fesetround.c (fesetround): Likewise. * sysdeps/tile/math_private.h (__fesetround): New inline function. * sysdeps/x86_64/fpu/fesetround.c (fesetround): Rename to __fesetround and define as weak alias of __fesetround. Use libm_hidden_weak. * sysdeps/generic/math_private.h (default_libc_fesetround): Call __fesetround instead of fesetround. (default_libc_feholdexcept_setround): Likewise. (libc_feholdsetround_ctx): Likewise. (libc_feholdsetround_noex_ctx): Likewise.
* Fix libm fesetenv namespace (bug 17748).Joseph Myers2015-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of fesetenv by making it a weak alias of __fesetenv and making the affected code (including various copies of feupdateenv which also gets called from C90 functions) call __fesetenv. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fesetenv failures disappear from the linknamespace test results (fsetround and feupdateenv remain to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__fesetenv): Use libm_hidden_proto. * math/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise. * sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv): Likewise. * sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise. * sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__fesetenv): New inline function. * sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and define as weak alias of __fesetenv. Use libm_hidden_weak. * sysdeps/generic/math_private.h (default_libc_fesetenv): Use __fesetenv instead of fesetenv. (libc_feresetround_noex_ctx): Likewise. * sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise. * sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise. * sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise.
* ARM: Consolidate with generic unwinder wrapper codeRoland McGrath2015-01-051-0/+33
|
* Fix libm feholdexcept namespace (bug 17748).Joseph Myers2015-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the fixes for C90 libm functions calling C99 fe* functions, this patch fixes the case of feholdexcept by making it a weak alias of __feholdexcept and making the affected code call __feholdexcept. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that feholdexcept failures disappear from the linknamespace test failures (fesetenv, fsetround and feupdateenv remain to be addressed to complete fixing bug 17748). [BZ #17748] * include/fenv.h (__feholdexcept): Declare. Use libm_hidden_proto. * math/feholdexcpt.c (feholdexcept): Rename to __feholdexcept and define as weak alias of __feholdexcept. Use libm_hidden_weak. * sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/alpha/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/arm/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/ia64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/mips/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/s390/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/x86_64/fpu/feholdexcpt.c (feholdexcept): Likewise. * sysdeps/generic/math_private.h (default_libc_feholdexcept): Use __feholdexcept instead of feholdexcept. (default_libc_feholdexcept_setround): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-0281-81/+81
|
* Fix libm fegetenv namespace (bug 17748).Joseph Myers2014-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some C90 libm functions call fegetenv via libc_feholdsetround* functions in math_private.h. This patch makes them call __fegetenv instead, making fegetenv into a weak alias for __fegetenv as needed. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). Also tested for ARM (soft-float) that fegetenv failures disappear from the linknamespace test failures (however, similar fixes will also be needed for fegetround, feholdexcept, fesetenv, fesetround and feupdateenv before this set of namespace issues covered by bug 17748 is fully fixed and those linknamespace tests start passing). [BZ #17748] * include/fenv.h (__fegetenv): Use libm_hidden_proto. * math/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/aarch64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/alpha/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/arm/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/i386/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/ia64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/mips/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/powerpc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/powerpc/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (__fegetenv): Likewise. * sysdeps/s390/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise. * sysdeps/sparc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def. * sysdeps/tile/math_private.h (__fegetenv): New inline function. * sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and define as weak alias of __fegetenv. Use libm_hidden_weak. * sysdeps/generic/math_private.h (libc_feholdsetround_ctx): Use __fegetenv instead of fegetenv. (libc_feholdsetround_noex_ctx): Likewise.
* Add hidden __tls_get_addr/___tls_get_addr aliasH.J. Lu2014-12-211-4/+3
| | | | | | | | | | | | | | | | | | | | __tls_get_addr/___tls_get_addr is always defined in ld.so. There is no need to call them via PLT inside ld.so. This patch adds the hidden __tls_get_addr/___tls_get_addr aliases and calls them directly from _dl_tlsdesc_dynamic. There is no need to set up the EBX register in i386 _dl_tlsdesc_dynamic when calling the hidden ___tls_get_addr. * elf/dl-tls.c (__tls_get_addr): Provide the hidden definition if not defined. * sysdeps/i386/dl-tls.h (___tls_get_addr): Provide the hidden definition. * sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the hidden ___tls_get_addr. * sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Call the hidden __tls_get_addr. * sysdeps/generic/localplt.data (__tls_get_addr): Removed. * sysdeps/unix/sysv/linux/i386/localplt.data (___tls_get_addr): Likewise.
* Fix profil_counter namespace (bug 17725).Joseph Myers2014-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ARM, where profil_counter is not static, it is brought in by references to various standard functions, as noted in <https://sourceware.org/ml/libc-alpha/2014-11/msg00890.html>, although it is not a standard function itself. I don't know if this also causes test failures on SPARC, although I see no reason for it not to do so. This patch fixes this namespace issue. profil_counter is renamed to __profil_counter and made a weak alias on ARM and SPARC. Because of the uses in profil.c / sprofil.c it seems simplest to make the rename globally, including on the other architectures for which profil_counter was static and so the change is of no substance. The variant names profil_counter_* used in sprofil.c are also renamed to start with __ so that undesired function names do not get exported in static libc. As I noted in bug 17726, profil_counter should probably be a compat symbol on ARM and SPARC, so it wouldn't exist at all in static libc even as a weak alias. Since defining a compat symbol still requires an internal name as a target of an alias, this patch still seems reasonable as an intermediate step towards that goal: it wouldn't be possible for the function simply to be static profil_counter on ARM and SPARC with profil_counter also being the exported compat symbol name, so profil.c / sprofil.c would still need to be prepared to call the function under another name (here, __profil_counter). Tested for x86_64 (testsuite, and that stripped installed shared libraries are unchanged by the patch) and ARM (ABI and linknamespace tests - this patch reduces the number of linknamespace failures I see on ARM from 227 to 5, the residue being math.h failures for fe* functions and for j0l/j1n/jnl/y0l/y1l/ynl aliases). 2014-12-17 Joseph Myers <joseph@codesourcery.com> [BZ #17725] * sysdeps/generic/profil-counter.h (profil_counter): Rename to __profil_counter. * sysdeps/unix/sysv/linux/hppa/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/tile/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter): Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter): Likewise. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h (profil_counter): Rename to __profil_counter. [!__profil_counter] (profil_counter): Define as weak alias of __profil_counter. * sysdeps/posix/profil.c: Update comment referring to profil_counter. (__profil): Use __profil_counter instead of profil_counter. * sysdeps/posix/sprofil.c (profil_counter): Rename to __profil_counter. Use __profil_counter_ushort and __profil_counter_uint in definitions. (__sprofil): Use __profil_counter_uint and __profil_counter_ushort instead of profil_counter_uint and profil_counter_ushort.
* Remove NOT_IN_libcSiddhesh Poyarekar2014-11-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with !IS_IN (libc). This completes the transition from the IS_IN/NOT_IN macros to the IN_MODULE macro set. The generated code is unchanged on x86_64. * stdlib/isomac.c (fmt): Replace NOT_IN_libc with IN_MODULE. (get_null_defines): Adjust. * sunrpc/Makefile: Adjust comment. * Makerules (CPPFLAGS-nonlib): Remove NOT_IN_libc. * elf/Makefile (CPPFLAGS-sotruss-lib): Likewise. (CFLAGS-interp.c): Likewise. (CFLAGS-ldconfig.c): Likewise. (CPPFLAGS-.os): Likewise. * elf/rtld-Rules (rtld-CPPFLAGS): Likewise. * extra-lib.mk (CPPFLAGS-$(lib)): Likewise. * extra-modules.mk (extra-modules.mk): Likewise. * iconv/Makefile (CPPFLAGS-iconvprogs): Likewise. * locale/Makefile (CPPFLAGS-locale_programs): Likewise. * malloc/Makefile (CPPFLAGS-memusagestat): Likewise. * nscd/Makefile (CPPFLAGS-nscd): Likewise. * nss/Makefile (CPPFLAGS-nss_test1): Likewise. * stdlib/Makefile (CFLAGS-tst-putenvmod.c): Likewise. * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): Likewise. * sysdeps/unix/sysv/linux/Makefile (CPPFLAGS-lddlibc4): Likewise. * iconvdata/Makefile (CPPFLAGS): Likewise. (cpp-srcs-left): Add libof for all iconvdata routines. * bits/stdio-lock.h: Replace NOT_IN_libc with IS_IN. * include/assert.h: Likewise. * include/ctype.h: Likewise. * include/errno.h: Likewise. * include/libc-symbols.h: Likewise. * include/math.h: Likewise. * include/netdb.h: Likewise. * include/resolv.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/string.h: Likewise. * include/sys/stat.h: Likewise. * include/wctype.h: Likewise. * intl/l10nflist.c: Likewise. * libidn/idn-stub.c: Likewise. * libio/libioP.h: Likewise. * nptl/libc_multiple_threads.c: Likewise. * nptl/pthreadP.h: Likewise. * posix/regex_internal.h: Likewise. * resolv/res_hconf.c: Likewise. * sysdeps/arm/armv7/multiarch/memcpy.S: Likewise. * sysdeps/arm/memmove.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/generic/_itoa.h: Likewise. * sysdeps/generic/symbol-hacks.h: Likewise. * sysdeps/gnu/errlist.awk: Likewise. * sysdeps/gnu/errlist.c: Likewise. * sysdeps/i386/i586/memcpy.S: Likewise. * sysdeps/i386/i586/memset.S: Likewise. * sysdeps/i386/i686/memcpy.S: Likewise. * sysdeps/i386/i686/memmove.S: Likewise. * sysdeps/i386/i686/mempcpy.S: Likewise. * sysdeps/i386/i686/memset.S: Likewise. * sysdeps/i386/i686/multiarch/bcopy.S: Likewise. * sysdeps/i386/i686/multiarch/bzero.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memchr.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcmp.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy.S: Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memmove.S: Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memrchr.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise. * sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/memset.S: Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise. * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcat-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcat.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strchr.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-sse4.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcmp.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/strcpy.S: Likewise. * sysdeps/i386/i686/multiarch/strcspn.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strlen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strlen.S: Likewise. * sysdeps/i386/i686/multiarch/strnlen.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2-bsf.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/strrchr.S: Likewise. * sysdeps/i386/i686/multiarch/strspn.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcschr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcschr.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcslen-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcslen.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-c.c: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr-sse2.S: Likewise. * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise. * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise. * sysdeps/ia64/fpu/libm-symbols.h: Likewise. * sysdeps/nptl/bits/libc-lock.h: Likewise. * sysdeps/nptl/bits/libc-lockP.h: Likewise. * sysdeps/nptl/bits/stdio-lock.h: Likewise. * sysdeps/posix/closedir.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/posix/readdir.c: Likewise. * sysdeps/posix/rewinddir.c: Likewise. * sysdeps/powerpc/novmx-sigjmp.c: Likewise. * sysdeps/powerpc/powerpc32/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc32/power6/memset.S: Likewise. * sysdeps/powerpc/powerpc32/setjmp.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/bzero.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/mempcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memset.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/rawmemchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/stpncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcasecmp_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strchrnul.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strcspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncase_l.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncat.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp-ppc64.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncmp.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strncpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strnlen.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strpbrk.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn-ppc64.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/strspn.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcschr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcscpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wcsrchr.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/wordcopy.c: Likewise. * sysdeps/powerpc/powerpc64/setjmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-32/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-32/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-32/multiarch/memset.S: Likewise. * sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise. * sysdeps/s390/s390-64/multiarch/memcmp.S: Likewise. * sysdeps/s390/s390-64/multiarch/memcpy.S: Likewise. * sysdeps/s390/s390-64/multiarch/memset.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise. * sysdeps/unix/alpha/sysdep.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/make-syscalls.sh: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/getpid.c: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/not-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/longjmp_chk.c: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/vfork.S: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/wordsize-32/symbol-hacks.h: Likewise. * sysdeps/x86_64/memcpy.S: Likewise. * sysdeps/x86_64/memmove.c: Likewise. * sysdeps/x86_64/memset.S: Likewise. * sysdeps/x86_64/multiarch/init-arch.h: Likewise. * sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise. * sysdeps/x86_64/multiarch/memcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcmp.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise. * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/memcpy.S: Likewise. * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memmove.c: Likewise. * sysdeps/x86_64/multiarch/mempcpy.S: Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise. * sysdeps/x86_64/multiarch/memset-avx2.S: Likewise. * sysdeps/x86_64/multiarch/memset.S: Likewise. * sysdeps/x86_64/multiarch/memset_chk.S: Likewise. * sysdeps/x86_64/multiarch/strcat-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcat-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcat.S: Likewise. * sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S: Likewise. * sysdeps/x86_64/multiarch/strchr.S: Likewise. * sysdeps/x86_64/multiarch/strcmp-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcmp.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Likewise. * sysdeps/x86_64/multiarch/strcpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/strcpy.S: Likewise. * sysdeps/x86_64/multiarch/strcspn.S: Likewise. * sysdeps/x86_64/multiarch/strspn.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy-c.c: Likewise. * sysdeps/x86_64/multiarch/wcscpy-ssse3.S: Likewise. * sysdeps/x86_64/multiarch/wcscpy.S: Likewise. * sysdeps/x86_64/multiarch/wmemcmp-c.c: Likewise. * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise. * sysdeps/x86_64/strcmp.S: Likewise.
* Remove IS_IN_rtldSiddhesh Poyarekar2014-11-243-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with IS_IN (rtld). Generated code is unchanged on x86_64. * elf/Makefile (CPPFLAGS-.os): Remove IS_IN_rtld. * elf/dl-open.c: Use IS_IN (rtld) instead if IS_IN_rtld. * elf/rtld-Rules: Likewise. * elf/setup-vdso.h: Likewise. * include/assert.h: Likewise. * include/bits/stdlib-float.h: Likewise. * include/errno.h: Likewise. * include/sys/stat.h: Likewise. * include/unistd.h: Likewise. * sysdeps/aarch64/setjmp.S: Likewise. * sysdeps/alpha/setjmp.S: Likewise. * sysdeps/arm/__longjmp.S: Likewise. * sysdeps/arm/aeabi_unwind_cpp_pr1.c: Likewise. * sysdeps/arm/setjmp.S: Likewise. * sysdeps/arm/sysdep.h: Likewise. * sysdeps/generic/_itoa.h: Likewise. * sysdeps/generic/dl-sysdep.h: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/i386/dl-tls.h: Likewise. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/m68k/setjmp.c: Likewise. * sysdeps/mach/hurd/dl-execstack.c: Likewise. * sysdeps/mach/hurd/opendir.c: Likewise. * sysdeps/posix/getcwd.c: Likewise. * sysdeps/posix/opendir.c: Likewise. * sysdeps/posix/profil.c: Likewise. * sysdeps/powerpc/dl-procinfo.h: Likewise. * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h: Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. * sysdeps/s390/dl-tls.h: Likewise. * sysdeps/s390/s390-32/setjmp.S: Likewise. * sysdeps/s390/s390-64/setjmp.S: Likewise. * sysdeps/sh/sh3/setjmp.S: Likewise. * sysdeps/sh/sh4/setjmp.S: Likewise. * sysdeps/unix/alpha/sysdep.h: Likewise. * sysdeps/unix/arm/sysdep.S: Likewise. * sysdeps/unix/i386/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise. * sysdeps/unix/sysv/linux/microblaze/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/tile/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/x86_64/sysdep.S: Likewise. * sysdeps/x86_64/setjmp.S: Likewise.
* Run check-localpltk/textrel/execstack over ld.so.Carlos O'Donell2014-11-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For maximum paranoia we run ld.so through the normal set of tests for all of the shared libraries. This includes running ld.so through check-localplt, check-textrel, and check-execstack. While none of these should trigger any failures given the way ld.so is built, it might possibly fail if a developer does something wrong. This paranoia was triggered by a discussion over the use of __strcpy vs. strcpy [1] and if the symbol could leak and use the libc.so version. The check-localplt test fails right away because localplt.data needs updating for all arches. By default we add 6 new symbols: __tls_get_addr, __libc_memalign, malloc, calloc, realloc and free. Other machines like i386, power, and s390 require some different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr for i386. Verified for i386 Verified for x86_64 Verified for ppc32 Verified for ppc64 Verified for ppc64le Verified for arm Verified for aarch64 Verified for s390 Verified for s390x Guessed for alpha Guessed for ia64 Guessed for m68k Guessed for microblaze Guessed for sparc32 Guessed for sparc64 Defaults for sh Defaults for mips Defaults for hppa Defaults for tile Machine manintainers notified to double check the data used in localplt.data. [1] https://sourceware.org/ml/libc-alpha/2014-10/msg00548.html
* Remove INTDEF / INTUSE / INTVARDEF (bug 14132).Joseph Myers2014-11-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completing the removal of the obsolete INTDEF / INTUSE mechanism, this patch removes the final use - that for _dl_starting_up - replacing it by rtld_hidden_def / rtld_hidden_proto. Having removed the last use, the mechanism itself is also removed. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. (This is not much of a test since this variable is only defined and used in the !HAVE_INLINED_SYSCALLS case.) [BZ #14132] * include/libc-symbols.h (INTUSE): Remove macro. (INTDEF): Likewise. (INTVARDEF): Likewise. (_INTVARDEF): Likewise. (INTDEF2): Likewise. (INTVARDEF2): Likewise. * elf/rtld.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Use rtld_hidden_def instead of INTVARDEF. * sysdeps/generic/ldsodefs.h [IS_IN_rtld] (_dl_starting_up_internal): Remove declaration. (_dl_starting_up): Use rtld_hidden_proto. * elf/dl-init.c [!HAVE_INLINED_SYSCALLS] (_dl_starting_up): Remove declaration. [!HAVE_INLINED_SYSCALLS] (_dl_starting_up_internal): Likewise. (_dl_init) [!HAVE_INLINED_SYSCALLS]: Don't use INTUSE with _dl_starting_up. * elf/dl-writev.h (_dl_writev): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h [!HAVE_INLINED_SYSCALLS] (DL_STARTING_UP_DEF): Use __GI__dl_starting_up instead of _dl_starting_up_internal.
* Don't use INTDEF/INTUSE with _dl_mcount (bug 14132).Joseph Myers2014-11-051-2/+1
| | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch replaces its use for _dl_mcount with use of rtld_hidden_def / rtld_hidden_proto. Tested for x86_64 that installed stripped shared libraries are unchanged by the patch. [BZ #14132] * elf/dl-profile.c (_dl_mcount): Use rtld_hidden_def instead of INTDEF. * sysdeps/generic/ldsodefs.h (_dl_mcount_internal): Remove declaration. (_dl_mcount): Use rtld_hidden_proto. * elf/dl-runtime.c (_dl_profile_fixup): Don't use INTUSE with _dl_mcount. * elf/rtld.c (_rtld_global_ro): Likewise.
* Don't use INTDEF/INTUSE with _dl_argv (bug 14132).Joseph Myers2014-11-041-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch replaces its use for _dl_argv with rtld_hidden_data_def and rtld_hidden_proto. Some places in .S files that previously used _dl_argv_internal or INTUSE(_dl_argv) now use __GI__dl_argv directly (there are plenty of existing examples of such direct use of __GI_*). A single place in rtld.c previously used _dl_argv without INTUSE, apparently accidentally, while the rtld_hidden_proto mechanism avoids such accidential omissions. As a consequence, this patch *does* change the contents of stripped ld.so. However, the installed stripped shared libraries are identical to those you get if instead of this patch you change that single _dl_argv use to use INTUSE, without any other changes. Tested for x86_64 (testsuite as well as comparison of installed stripped shared libraries as described above). [BZ #14132] * sysdeps/generic/ldsodefs.h (_dl_argv): Use rtld_hidden_proto. [IS_IN_rtld] (_dl_argv_internal): Do not declare. (rtld_progname): Make macro definition unconditional. * elf/rtld.c (_dl_argv): Use rtld_hidden_data_def instead of INTDEF. (dlmopen_doit): Do not use INTUSE with _dl_argv. (dl_main): Likewise. * elf/dl-sysdep.c (_dl_sysdep_start): Likewise. * sysdeps/alpha/dl-machine.h (RTLD_START): Use __GI__dl_argv instead of _dl_argv_internal. * sysdeps/powerpc/powerpc32/dl-start.S (_dl_start_user): Use __GI__dl_argv instead of INTUSE(_dl_argv). * sysdeps/powerpc/powerpc64/dl-machine.h (RTLD_START): Use __GI__dl_argv instead of _dl_argv_internal.
* Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132).Joseph Myers2014-10-281-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this patch replaces its use in unwind-dw2-fde.c with hidden_def and hidden_proto. Tested for x86. This patch does result in code generation differences (for some reason GCC decides to partition __register_frame_info_bases after the patch). [BZ #14132] * sysdeps/generic/unwind-dw2-fde.c (__register_frame_info_bases_internal): Do not declare. (__register_frame_info_table_bases_internal): Likewise. (__deregister_frame_info_bases_internal): Likewise. (__register_frame_info_bases): Declare and use hidden_proto before definition. Use hidden_def instead of INTDEF. (__register_frame_info_table_bases): Likewise. (__deregister_frame_info_bases): Likewise. (__register_frame_info): Do not use INTUSE. (__register_frame): Likewise. (__register_frame_info_table): Likewise. (__register_frame_table): Likewise. (__deregister_frame_info): Likewise. (__deregister_frame): Likewise.
* Add __safe_fatal and use it in __pthread_unwind forwarder fallback.Roland McGrath2014-07-311-0/+37
|
* Use __builtin_trap for ABORT_INSTRUCTION.Roland McGrath2014-07-311-1/+30
|
* Fix Wundef warning for __cplusplusSiddhesh Poyarekar2014-07-091-1/+1
| | | | | All current uses of the __cplusplus macro only check if it is defined or not. Fix this #if to use $ifdef like the rest of the code.
* Add comment for MEMCPY_OK_FOR_FWD_MEMMOVESiddhesh Poyarekar2014-07-051-0/+3
|
* Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAILRichard Henderson2014-07-031-1/+1
|
* Always provide HP_SMALL_TIMING_AVAILRichard Henderson2014-07-031-0/+1
|
* Unify hp-timing implementationsRichard Henderson2014-07-032-31/+63
| | | | Provide an hp-timing-common.h for ports to use.
* Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overheadRichard Henderson2014-07-032-9/+0
| | | | | Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either.
* Removing HP_TIMING_ACCUM as unusedRichard Henderson2014-07-031-8/+2
|
* Removing HP_TIMING_ZERO as unusedRichard Henderson2014-07-031-3/+0
|
* Fix -Wundef warning on PAGE_COPY_THRESHOLDSiddhesh Poyarekar2014-07-032-45/+50
| | | | | | | The PAGE_COPY_THRESHOLD macro is meant to be overridden by architecture-specific pagecopy.h, but it is currently done only by mach; all other architectures use the default. Check to see if the macro is defined in addition to whether it is set to a non-zero value.
* Fix Wundef warning for MEMCPY_OK_FOR_FWD_MEMMOVESiddhesh Poyarekar2014-06-281-0/+2
| | | | | | | Define MEMCPY_OK_FOR_FWD_MEMMOVE in memcopy.h and let arch-specific implementations of that file override the value if necessary. This override is only useful for tile and moving this macro to memcopy.h allows us to remove the tile-specific memmove.c.
* Remove configure tests for assembler CFI support.Joseph Myers2014-06-261-61/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes configure tests for assembler CFI support (and thereby eliminates an architecture-specific case in the main configure.ac), instead assuming that support is present unconditionally. The main test was added in 2003 around the time CFI support was added to the assembler. cfi_personality and cfi_lsda support were added to the assembler in 2006. cfi_sections support was added in 2009, a few weeks before binutils 2.20 was released; it's in 2.20, the minimum supported version, so even that configure test is obsolete. Tested x86_64 that the installed shared libraries are unchanged by this patch. * configure.ac (libc_cv_asm_cfi_directives): Remove configure test. * configure: Regenerated. * config.h.in (HAVE_ASM_CFI_DIRECTIVES): Remove macro undefine. * sysdeps/arm/configure.ac (libc_cv_asm_cfi_directive_sections): Remove configure test. * sysdeps/arm/configure: Regenerated. * sysdeps/nptl/configure.ac: Do not check libc_cv_asm_cfi_directives. * sysdeps/nptl/configure: Regenerated. * sysdeps/x86_64/nptl/configure.ac: Remove file. * sysdeps/x86_64/nptl/configure: Remove generated file. * b/sysdeps/generic/sysdep.h [HAVE_ASM_CFI_DIRECTIVES]: Make code unconditional. [!HAVE_ASM_CFI_DIRECTIVES]: Remove conditional code.
* Remove stray includes of kernel-features.h.Joseph Myers2014-06-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that files using __ASSUME_* macros have been made by <https://sourceware.org/ml/libc-alpha/2014-06/msg00543.html> to include <kernel-features.h> directly, any include from a file not using __ASSUME_* macros can safely be removed (as there will no longer be some other file relying on indirect inclusion via a header from which the include is being removed). This patch removes such unnecessary kernel-features.h includes. Tested x86_64 that disassembly of installed shared libraries is unchanged by this patch, except for line numbers in calls to __assert_fail from libc.so and ld.so. 2014-06-23 Joseph Myers <joseph@codesourcery.com> * nptl/createthread.c: Don't include kernel-features.h. * nptl/pthread_cancel.c: Likewise. * nptl/pthread_condattr_setclock.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pt-raise.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. * nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c: Likewise. * nptl/sysdeps/unix/sysv/linux/raise.c: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_create.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_delete.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_getoverr.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_gettime.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_routines.c: Likewise. * nptl/sysdeps/unix/sysv/linux/timer_settime.c: Likewise. * nscd/gai.c: Likewise. * nss/nss_db/db-open.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/sh/nptl/tls.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/aarch64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/adjtime.c: Likewise. * sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise. * sysdeps/unix/sysv/linux/clock_getres.c: Likewise. * sysdeps/unix/sysv/linux/clock_gettime.c: Likewise. * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise. * sysdeps/unix/sysv/linux/clock_settime.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/generic/futimesat.c: Likewise. * sysdeps/unix/sysv/linux/generic/poll.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c: Likewise. * sysdeps/unix/sysv/linux/getcwd.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/getsysstats.c: Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c: Likewise. * sysdeps/unix/sysv/linux/ia64/system.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/ifaddrs.c: Likewise. * sysdeps/unix/sysv/linux/ifreq.c: Likewise. * sysdeps/unix/sysv/linux/ldsodefs.h: Likewise. * sysdeps/unix/sysv/linux/lutimes.c: Likewise. * sysdeps/unix/sysv/linux/m68k/vfork.S: Likewise. * sysdeps/unix/sysv/linux/microblaze/nptl/vfork.S: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/accept4.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/mmap64.c: Likewise. * sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/prof-freq.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/s390/system.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread.c: Likewise. * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/xstatconv.c: Likewise. * sysdeps/unix/sysv/linux/sparc/system.c: Likewise. * sysdeps/unix/sysv/linux/syslog.c: Likewise. * sysdeps/unix/sysv/linux/system.c: Likewise. * sysdeps/unix/sysv/linux/testrtsig.h: Likewise. * sysdeps/unix/sysv/linux/timespec_get.c: Likewise. * sysdeps/unix/sysv/linux/ttyname.c: Likewise. * sysdeps/unix/sysv/linux/ttyname_r.c: Likewise. * sysdeps/unix/sysv/linux/utimensat.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/xstatconv.h: Likewise.
* Add missing #include in get-rounding-mode.hRoland McGrath2014-06-231-0/+1
|
* Add generic HAVE_RM_CTX implementationWilco Dijkstra2014-06-231-19/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a generic implementation of HAVE_RM_CTX using standard fenv calls. As a result math functions using SET_RESTORE_ROUND* macros do not suffer from a large slowdown on targets which do not implement optimized libc_fe*_ctx inline functions. Most of the libc_fe* inline functions are now unused and could be removed in the future (there are a few math functions left which use a mixture of standard fenv calls and libc_fe* inline functions - they could be updated to use SET_RESTORE_ROUND or improved to avoid expensive fenv manipulations across just a few FP instructions). libc_feholdsetround*_noex_ctx is added to enable better optimization of SET_RESTORE_ROUND_NOEX* implementations. Performance measurements on ARM and x86 of sin() show significant gains over the current default, fairly close to a highly optimized fenv_private: ARM x86 no fenv_private : 100% 100% generic HAVE_RM_CTX : 250% 350% fenv_private (CTX) : 250% 450% 2014-06-23 Will Newton <will.newton@linaro.org> Wilco <wdijkstr@arm.com> * sysdeps/generic/math_private.h: Add generic HAVE_RM_CTX implementation. Include get-rounding-mode.h. [!HAVE_RM_CTX]: Define HAVE_RM_CTX to zero. [!libc_feholdsetround_noex_ctx]: Define libc_feholdsetround_noex_ctx. [!libc_feholdsetround_noexf_ctx]: Define libc_feholdsetround_noexf_ctx. [!libc_feholdsetround_noexl_ctx]: Define libc_feholdsetround_noexl_ctx. (libc_feholdsetround_ctx): New function. (libc_feresetround_ctx): New function. (libc_feholdsetround_noex_ctx): New function. (libc_feresetround_noex_ctx): New function.
* Add fallback file for elide.hAndi Kleen2014-06-141-0/+25
| | | | | | Add the missing fallback file for elide.h to fix non x86 builds. Sorry about that. This is just a noop macro file that makes all elision code to be optimized out.
* Remove second argument from TLS_INIT_TP macroAndreas Schwab2014-05-271-4/+3
|
* Clean up __exit_thread.Roland McGrath2014-05-131-0/+28
|
* More fixes for unsafe compiler optimizationAdhemerval Zanella2014-04-301-0/+1
| | | | | GCC 4.9 -ftree-loop-distribute-patterns now may transform loops in memcpy. Add the alias to internal GLIBC symbol to avoid PLT creation.
* Add fenv test support for targets which don't have FP traps.Wilco2014-04-171-0/+11
|
* Factor mmap/munmap of PT_LOAD segments out of _dl_map_object_from_fd et al.Roland McGrath2014-04-031-3/+1
|
* S390: Define SIZE_MAX as unsigned long (BZ #16712).Stefan Liebler2014-03-241-1/+5
|
* Revert "Fix HP_SMALL_TIMING_AVAIL -Wundef warnings"Will Newton2014-03-171-2/+2
| | | | This reverts commit 53f1bed39263541ef7f3d86f9701005524938016.
* Revert "Fix HAVE_RM_CTX -Wundef warnings"Will Newton2014-03-171-1/+1
| | | | This reverts commit 9290130a8de3f30970f741c79dfe8459f798e05f.
* Fix HAVE_RM_CTX -Wundef warningsWill Newton2014-03-171-1/+1
| | | | | | | | | | ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/math_private.h: Check whether HAVE_RM_CTX is defined with #ifdef rather than #if.
* Fix HP_SMALL_TIMING_AVAIL -Wundef warningsWill Newton2014-03-171-2/+2
| | | | | | | | | | ChangeLog: 2014-03-17 Will Newton <will.newton@linaro.org> * sysdeps/generic/ldsodefs.h: Check whether HP_SMALL_TIMING_AVAIL is defined with #ifdef rather than #if.
* BZ #16613: Support TLS in audit libraries.Carlos O'Donell2014-02-251-0/+3
| | | | | | | | | | | This commit fixes a bug where the dynamic loader would crash when loading audit libraries, via LD_AUDIT, where those libraries used TLS. The dynamic loader was not considering that the audit libraries would use TLS and failed to bump the TLS generation counter leaving TLS usage inconsistent after loading the audit libraries. https://sourceware.org/ml/libc-alpha/2014-02/msg00569.html
* Combine __USE_BSD and __USE_SVID into __USE_MISC.Joseph Myers2014-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up following the obsoletion of _BSD_SOURCE and _SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC. The only non-mechanical part of this patch is the changes to features.h; everything else is simple substitution of __USE_MISC for the old macros. Thus, this patch leaves obviously redundant conditionals such as "defined __USE_MISC || defined __USE_MISC", and does not update #endif comments where they referred to BSD or SVID in words instead of the literal macro name. This is intended to facilitate patch review by separating the less mechanical changes from these purely mechanical changes into a separate patch. (I do intend to integrate all the changes from <https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I believe includes all the trailing comment updates, in subsequent patches.) Tested x86_64. * include/features.h (__USE_BSD): Remove macro definitions. (__USE_SVID): Likewise. (_BSD_SOURCE): Likewise. (_SVID_SOURCE): Likewise. [!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition from definition of _DEFAULT_SOURCE. [_BSD_SOURCE || _SVID_SOURCE]: Change condition to [_DEFAULT_SOURCE]. * bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC]. * bits/mman.h [__USE_BSD]: Likewise. * bits/termios.h [__USE_BSD]: Likewise. * bits/waitstatus.h [__USE_BSD]: Likewise. * ctype/ctype.h [__USE_SVID]: Likewise. * dirent/dirent.h [__USE_BSD]: Likewise. * grp/grp.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * inet/netinet/igmp.h [__USE_BSD]: Likewise. * io/fcntl.h [__USE_BSD]: Likewise. * io/ftw.h [__USE_BSD]: Likewise. * io/sys/stat.h [__USE_BSD]: Likewise. * libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise. * libio/bits/stdio2.h [__USE_BSD]: Likewise. * libio/stdio.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * math/math.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise. * misc/bits/syslog.h [__USE_BSD]: Likewise. * misc/search.h [__USE_SVID]: Likewise. * misc/sys/mman.h [__USE_BSD]: Likewise. * misc/sys/syslog.h [__USE_BSD]: Likewise. * misc/sys/uio.h [__USE_BSD]: Likewise. * posix/bits/unistd.h [__USE_BSD]: Likewise. * posix/glob.h [__USE_BSD]: Likewise. * posix/regex.h [__USE_BSD]: Likewise. * posix/sys/types.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/sys/utsname.h [__USE_SVID]: Likewise. * posix/sys/wait.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/unistd.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * pwd/pwd.h [__USE_SVID]: Likewise. * resolv/netdb.h [__USE_BSD]: Likewise. * setjmp/setjmp.h [__USE_BSD]: Likewise. * signal/signal.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * socket/sys/socket.h [__USE_BSD]: Likewise. * stdlib/fmtmsg.h [__USE_SVID]: Likewise. * stdlib/stdlib.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string2.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string3.h [__USE_BSD]: Likewise. * string/endian.h [__USE_BSD]: Likewise. * string/string.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * string/strings.h [__USE_BSD]: Likewise. * sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise. * sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/x86/bits/string.h [__USE_BSD]: Likewise. * sysvipc/sys/ipc.h [__USE_SVID]: Likewise. * termios/termios.h [__USE_BSD]: Likewise. * time/sys/time.h [__USE_BSD]: Likewise. * time/time.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change condition to [__USE_MISC].
* Avoid comma operator warnings.Roland McGrath2014-02-071-1/+1
|
* Revert "Patch [1/4] async-signal safe TLS."Allan McRae2014-02-061-5/+0
| | | | This reverts commit 69a17d9d245dc3551792e95e1823cc2d877592f3.