diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-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 |
8 files changed, 79 insertions, 15 deletions
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 |