diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-09-13 06:01:04 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-09-16 13:00:11 -0700 |
commit | a574db341f6583a625f529493ec423ab436f69c9 (patch) | |
tree | 17469779f5091ba2d4f5ac50156a8c21e60bc492 /sysdeps | |
parent | 5c0fcf5e6abb72f16fc5a260218a3dc4d16a977f (diff) | |
download | glibc-hjl/pthread/2.21.tar glibc-hjl/pthread/2.21.tar.gz glibc-hjl/pthread/2.21.tar.bz2 glibc-hjl/pthread/2.21.zip |
Use STB_SECONDARY on pthread functions in libchjl/pthread/2.21
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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/localplt.data | 12 | ||||
-rw-r--r-- | sysdeps/nptl/bits/libc-lockP.h | 65 | ||||
-rw-r--r-- | sysdeps/nptl/pthread-functions.h | 10 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fatal-prepare.h | 32 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/libc.abilist | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/localplt.data | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/cancellation.S | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 12 |
11 files changed, 137 insertions, 44 deletions
diff --git a/sysdeps/generic/localplt.data b/sysdeps/generic/localplt.data index 1a40cf9841..5b1463f584 100644 --- a/sysdeps/generic/localplt.data +++ b/sysdeps/generic/localplt.data @@ -1,6 +1,18 @@ # See scripts/check-localplt.awk for how this file is processed. # PLT use is required for the malloc family and for matherr because # users can define their own functions and have library internals call them. +# pthread functions may be preempted by libpthread at run-time. +libc.so: __pthread_getspecific +libc.so: __pthread_key_create +libc.so: __pthread_once +libc.so: __pthread_rwlock_rdlock +libc.so: __pthread_rwlock_unlock +libc.so: __pthread_rwlock_wrlock +libc.so: __pthread_setcancelstate +libc.so: __pthread_setspecific +libc.so: __pthread_unwind +libc.so: _pthread_cleanup_pop_restore +libc.so: _pthread_cleanup_push_defer libc.so: calloc libc.so: free libc.so: malloc diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h index f55f6212ec..f5753afb32 100644 --- a/sysdeps/nptl/bits/libc-lockP.h +++ b/sysdeps/nptl/bits/libc-lockP.h @@ -99,39 +99,51 @@ typedef pthread_key_t __libc_key_t; #define __rtld_lock_initialize(NAME) \ (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER) +#ifdef HAVE_ASM_SECONDARY_DIRECTIVE +/* All pthread functions are available. */ +# define PTFAVAIL(NAME) 1 + +/* When secondary symbols are used, FUNC is implemented to return ELSE so + that we can always call FUNC. */ +# define __libc_maybe_call(FUNC, ARGS, ELSE) FUNC ARGS +# define __libc_ptf_call(FUNC, ARGS, ELSE) FUNC ARGS +# define __libc_ptf_call_always(FUNC, ARGS) FUNC ARGS +#else /* If we check for a weakly referenced symbol and then perform a normal jump to it te code generated for some platforms in case of PIC is unnecessarily slow. What would happen is that the function is first referenced as data and then it is called indirectly through the PLT. We can make this a direct jump. */ -#ifdef __PIC__ -# define __libc_maybe_call(FUNC, ARGS, ELSE) \ - (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \ - _fn != NULL ? (*_fn) ARGS : ELSE; })) -#else -# define __libc_maybe_call(FUNC, ARGS, ELSE) \ - (FUNC != NULL ? FUNC ARGS : ELSE) -#endif +# ifdef __PIC__ +# define __libc_maybe_call(FUNC, ARGS, ELSE) \ + (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \ + _fn != NULL ? (*_fn) ARGS : ELSE; })) +# else +# define __libc_maybe_call(FUNC, ARGS, ELSE) \ + (FUNC != NULL ? FUNC ARGS : ELSE) +# endif /* Call thread functions through the function pointer table. */ -#if defined SHARED && IS_IN (libc) -# define PTFAVAIL(NAME) __libc_pthread_functions_init -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ +# if defined SHARED && IS_IN (libc) \ + && !defined HAVE_ASM_SECONDARY_DIRECTIVE +# define PTFAVAIL(NAME) __libc_pthread_functions_init +# define __libc_ptf_call(FUNC, ARGS, ELSE) \ (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ +# define __libc_ptf_call_always(FUNC, ARGS) \ PTHFCT_CALL (ptr_##FUNC, ARGS) -#elif IS_IN (libpthread) -# define PTFAVAIL(NAME) 1 -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ +# elif IS_IN (libpthread) +# define PTFAVAIL(NAME) 1 +# define __libc_ptf_call(FUNC, ARGS, ELSE) \ FUNC ARGS -# define __libc_ptf_call_always(FUNC, ARGS) \ +# define __libc_ptf_call_always(FUNC, ARGS) \ FUNC ARGS -#else -# define PTFAVAIL(NAME) (NAME != NULL) -# define __libc_ptf_call(FUNC, ARGS, ELSE) \ - __libc_maybe_call (FUNC, ARGS, ELSE) -# define __libc_ptf_call_always(FUNC, ARGS) \ +# else +# define PTFAVAIL(NAME) (NAME != NULL) +# define __libc_ptf_call(FUNC, ARGS, ELSE) \ + __libc_maybe_call (FUNC, ARGS, ELSE) +# define __libc_ptf_call_always(FUNC, ARGS) \ FUNC ARGS +# endif #endif @@ -364,6 +376,8 @@ extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); +extern int __pthread_setcancelstate (int state, int *oldstate); + extern int __pthread_setspecific (pthread_key_t __key, const void *__pointer); @@ -379,8 +393,9 @@ extern int __pthread_atfork (void (*__prepare) (void), /* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES + single-threaded processes unless secondary symbols are used. */ +#if !defined __NO_WEAK_PTHREAD_ALIASES \ + && !defined HAVE_ASM_SECONDARY_DIRECTIVE # ifdef weak_extern weak_extern (__pthread_mutex_init) weak_extern (__pthread_mutex_destroy) @@ -405,7 +420,7 @@ weak_extern (__pthread_initialize) weak_extern (__pthread_atfork) weak_extern (_pthread_cleanup_push_defer) weak_extern (_pthread_cleanup_pop_restore) -weak_extern (pthread_setcancelstate) +weak_extern (__pthread_setcancelstate) # else # pragma weak __pthread_mutex_init # pragma weak __pthread_mutex_destroy @@ -429,7 +444,7 @@ weak_extern (pthread_setcancelstate) # pragma weak __pthread_atfork # pragma weak _pthread_cleanup_push_defer # pragma weak _pthread_cleanup_pop_restore -# pragma weak pthread_setcancelstate +# pragma weak __pthread_setcancelstate # endif #endif diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h index 0784c59cab..f6238ab663 100644 --- a/sysdeps/nptl/pthread-functions.h +++ b/sysdeps/nptl/pthread-functions.h @@ -30,6 +30,7 @@ struct xid_command; the thread functions. */ struct pthread_functions { +#ifndef HAVE_ASM_SECONDARY_DIRECTIVE int (*ptr_pthread_attr_destroy) (pthread_attr_t *); int (*ptr___pthread_attr_init_2_0) (pthread_attr_t *); int (*ptr___pthread_attr_init_2_1) (pthread_attr_t *); @@ -75,9 +76,8 @@ struct pthread_functions int (*ptr_pthread_mutex_lock) (pthread_mutex_t *); int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *); pthread_t (*ptr_pthread_self) (void); - int (*ptr_pthread_setcancelstate) (int, int *); + int (*ptr___pthread_setcancelstate) (int, int *); int (*ptr_pthread_setcanceltype) (int, int *); - void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *); int (*ptr___pthread_once) (pthread_once_t *, void (*) (void)); int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *); int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *); @@ -89,10 +89,12 @@ struct pthread_functions void (*) (void *), void *); void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *, int); -#define HAVE_PTR_NTHREADS - unsigned int *ptr_nthreads; void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *) __attribute ((noreturn)) __cleanup_fct_attribute; +#endif + void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *); +#define HAVE_PTR_NTHREADS + unsigned int *ptr_nthreads; void (*ptr__nptl_deallocate_tsd) (void); int (*ptr__nptl_setxid) (struct xid_command *); void (*ptr_freeres) (void); diff --git a/sysdeps/unix/sysv/linux/fatal-prepare.h b/sysdeps/unix/sysv/linux/fatal-prepare.h index 45d88ce911..39cff249db 100644 --- a/sysdeps/unix/sysv/linux/fatal-prepare.h +++ b/sysdeps/unix/sysv/linux/fatal-prepare.h @@ -19,19 +19,23 @@ /* We have to completely disable cancellation. assert() must not be a cancellation point but the implementation uses write() etc. */ -#ifdef SHARED -# include <pthread-functions.h> -# define FATAL_PREPARE \ - { \ - if (__libc_pthread_functions_init) \ - PTHFCT_CALL (ptr_pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \ - NULL)); \ - } +#ifdef HAVE_ASM_SECONDARY_DIRECTIVE +# define FATAL_PREPARE __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); #else -# pragma weak pthread_setcancelstate -# define FATAL_PREPARE \ - { \ - if (pthread_setcancelstate != NULL) \ - pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \ - } +# ifdef SHARED +# include <pthread-functions.h> +# define FATAL_PREPARE \ + { \ + if (__libc_pthread_functions_init) \ + PTHFCT_CALL (ptr___pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \ + NULL)); \ + } +# else +# pragma weak __pthread_setcancelstate +# define FATAL_PREPARE \ + { \ + if (__pthread_setcancelstate != NULL) \ + __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \ + } +# endif #endif diff --git a/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S b/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S index 111e9c88ed..cf3f206445 100644 --- a/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S +++ b/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S @@ -16,4 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#if IS_IN (libc) && !defined SHARED +/* Allow libpthread.a to override the ones in libc.a. */ + weak_extern (__lll_lock_wait_private) + weak_extern (__lll_unlock_wake_private) +#endif + #include "lowlevellock.S" diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 3cb314ddfc..c8a8ebd218 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -189,6 +189,12 @@ GLIBC_2.0 __profile_frequency F __progname D 0x4 __progname_full D 0x4 + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_lock F + __pthread_mutex_unlock F + __pthread_once F + __pthread_setspecific F __rcmd_errstr D 0x4 __read F __realloc_hook D 0x4 @@ -269,6 +275,8 @@ GLIBC_2.0 _obstack_free F _obstack_memory_used F _obstack_newchunk F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push_defer F _res D 0x200 _rpc_dtablesize F _seterr_reply F @@ -868,6 +876,7 @@ GLIBC_2.0 pthread_mutex_init F pthread_mutex_lock F pthread_mutex_unlock F + pthread_once F pthread_self F pthread_setcancelstate F pthread_setcanceltype F @@ -1882,6 +1891,9 @@ GLIBC_2.2 __lxstat64 F __nl_langinfo_l F __open64 F + __pthread_rwlock_rdlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F __res_init F __res_nclose F __res_ninit F diff --git a/sysdeps/unix/sysv/linux/i386/localplt.data b/sysdeps/unix/sysv/linux/i386/localplt.data index b25abf8006..a3fcb91c76 100644 --- a/sysdeps/unix/sysv/linux/i386/localplt.data +++ b/sysdeps/unix/sysv/linux/i386/localplt.data @@ -4,6 +4,18 @@ libc.so: free libc.so: malloc libc.so: memalign libc.so: realloc +# pthread functions may be preempted by libpthread at run-time. +libc.so: __pthread_getspecific +libc.so: __pthread_key_create +libc.so: __pthread_once +libc.so: __pthread_rwlock_rdlock +libc.so: __pthread_rwlock_unlock +libc.so: __pthread_rwlock_wrlock +libc.so: __pthread_setcancelstate +libc.so: __pthread_setspecific +libc.so: __pthread_unwind +libc.so: _pthread_cleanup_pop_restore +libc.so: _pthread_cleanup_push_defer libm.so: matherr # The dynamic loader uses __libc_memalign internally to allocate aligned # TLS storage. The other malloc family of functions are expected to allow diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index 914b5908f0..56d1fe0aec 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -377,6 +377,15 @@ GLIBC_2.2.5 __profile_frequency F __progname D 0x8 __progname_full D 0x8 + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_lock F + __pthread_mutex_unlock F + __pthread_once F + __pthread_rwlock_rdlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F __pwrite64 F __rawmemchr F __rcmd_errstr D 0x8 @@ -527,6 +536,8 @@ GLIBC_2.2.5 _obstack_free F _obstack_memory_used F _obstack_newchunk F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push_defer F _res D 0x238 _res_hconf D 0x48 _rpc_dtablesize F @@ -1299,6 +1310,7 @@ GLIBC_2.2.5 pthread_mutex_init F pthread_mutex_lock F pthread_mutex_unlock F + pthread_once F pthread_self F pthread_setcancelstate F pthread_setcanceltype F diff --git a/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/sysdeps/unix/sysv/linux/x86_64/cancellation.S index 4c34bebc42..52a27dcc5e 100644 --- a/sysdeps/unix/sysv/linux/x86_64/cancellation.S +++ b/sysdeps/unix/sysv/linux/x86_64/cancellation.S @@ -26,7 +26,7 @@ # define __pthread_unwind __GI___pthread_unwind # endif #else -# ifndef SHARED +# if !defined SHARED && !defined HAVE_ASM_SECONDARY_DIRECTIVE .weak __pthread_unwind # endif #endif diff --git a/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S b/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S index 111e9c88ed..cf3f206445 100644 --- a/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S +++ b/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S @@ -16,4 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#if IS_IN (libc) && !defined SHARED +/* Allow libpthread.a to override the ones in libc.a. */ + weak_extern (__lll_lock_wait_private) + weak_extern (__lll_unlock_wake_private) +#endif + #include "lowlevellock.S" diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index 0f64c8d20f..dacadc0155 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -341,6 +341,15 @@ GLIBC_2.16 __profile_frequency F __progname D 0x4 __progname_full D 0x4 + __pthread_getspecific F + __pthread_key_create F + __pthread_mutex_lock F + __pthread_mutex_unlock F + __pthread_once F + __pthread_rwlock_rdlock F + __pthread_rwlock_unlock F + __pthread_rwlock_wrlock F + __pthread_setspecific F __ptsname_r_chk F __pwrite64 F __rawmemchr F @@ -543,6 +552,8 @@ GLIBC_2.16 _obstack_free F _obstack_memory_used F _obstack_newchunk F + _pthread_cleanup_pop_restore F + _pthread_cleanup_push_defer F _res D 0x200 _res_hconf D 0x30 _rpc_dtablesize F @@ -1448,6 +1459,7 @@ GLIBC_2.16 pthread_mutex_init F pthread_mutex_lock F pthread_mutex_unlock F + pthread_once F pthread_self F pthread_setcancelstate F pthread_setcanceltype F |