diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-12 16:42:39 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-26 13:36:17 -0300 |
| commit | 78d1724d53e23fcbbf4df832015aae269b98249c (patch) | |
| tree | 0afd09f9c7536942ca5ffc23450d9427320914f6 | |
| parent | 4d2e9ef806bd9edc9cf5e133983a4e86ddab381a (diff) | |
| download | glibc-78d1724d53e23fcbbf4df832015aae269b98249c.tar.xz glibc-78d1724d53e23fcbbf4df832015aae269b98249c.zip | |
nptl: Remove send from libpthread
The libc version is identical and built with same flags. Both aarch64
and nios2 also requires to export __send and tt was done previously with
the HAVE_INTERNAL_SEND_SYMBOL (which forced the symbol creation).
All __send callers are internal to libc and the original issue that
required the symbol export was due a missing libc_hidden_def. So
a compat symbol is added for __send and the libc_hidden_def is
defined regardless.
Checked on x86_64-linux-gnu and i686-linux-gnu.
40 files changed, 21 insertions, 76 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index b1948cc47a..3cf48c3042 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -81,7 +81,6 @@ static-only-routines = pthread_atfork # We need to provide certain routines for compatibility with existing # binaries. pthread-compat-wrappers = \ - send \ lseek lseek64 \ open open64 \ pread pread64 pwrite pwrite64 \ @@ -292,7 +291,6 @@ CFLAGS-msgrcv.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msgsnd.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-open.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-open64.c += -fexceptions -fasynchronous-unwind-tables -CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/Versions b/nptl/Versions index be7a8e68cc..6e80568e57 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -120,7 +120,6 @@ libpthread { __pthread_mutexattr_settype; __pthread_once; __pthread_setspecific; - __send; __sigaction; _exit; _pthread_cleanup_pop; @@ -170,7 +169,6 @@ libpthread { sem_post; sem_trywait; sem_wait; - send; sigaction; siglongjmp; } diff --git a/socket/Makefile b/socket/Makefile index 75582b1513..855510ad48 100644 --- a/socket/Makefile +++ b/socket/Makefile @@ -42,3 +42,4 @@ CFLAGS-recvfrom.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sendto.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables +CFLAGS-send.c += -fexceptions -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index bac795262d..29f41b7ed5 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -371,6 +371,7 @@ GLIBC_2.17 __sched_getscheduler F GLIBC_2.17 __sched_setscheduler F GLIBC_2.17 __sched_yield F GLIBC_2.17 __select F +GLIBC_2.17 __send F GLIBC_2.17 __setmntent F GLIBC_2.17 __setpgid F GLIBC_2.17 __sigaction F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index bbd24afae2..beeb6c64c7 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -37,7 +37,6 @@ GLIBC_2.17 __pthread_unregister_cancel_restore F GLIBC_2.17 __pthread_unwind_next F GLIBC_2.17 __pwrite64 F GLIBC_2.17 __res_state F -GLIBC_2.17 __send F GLIBC_2.17 __sigaction F GLIBC_2.17 _pthread_cleanup_pop F GLIBC_2.17 _pthread_cleanup_pop_restore F @@ -162,7 +161,6 @@ GLIBC_2.17 sem_timedwait F GLIBC_2.17 sem_trywait F GLIBC_2.17 sem_unlink F GLIBC_2.17 sem_wait F -GLIBC_2.17 send F GLIBC_2.17 sigaction F GLIBC_2.17 siglongjmp F GLIBC_2.18 pthread_getattr_default_np F diff --git a/sysdeps/unix/sysv/linux/aarch64/send.c b/sysdeps/unix/sysv/linux/aarch64/send.c new file mode 100644 index 0000000000..db4d36b2b1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/send.c @@ -0,0 +1,9 @@ +#include <shlib-compat.h> + +#include <sysdeps/unix/sysv/linux/send.c> + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_17, GLIBC_2_34) +/* libpthread compat symbol: AArch64 used the generic version without the + libc_hidden_def which lead in a non existent __send symbol in libc.so. */ +compat_symbol (libc, __libc_send, __send, GLIBC_2_17); +#endif diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 3059b8a147..b01911247f 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -164,10 +164,6 @@ # define HAVE_CLOCK_GETTIME64_VSYSCALL "__kernel_clock_gettime" # define HAVE_GETTIMEOFDAY_VSYSCALL "__kernel_gettimeofday" -/* Previously AArch64 used the generic version without the libc_hidden_def - which lead in a non existent __send symbol in libc.so. */ -# undef HAVE_INTERNAL_SEND_SYMBOL - # define SINGLE_THREAD_BY_GLOBAL 1 # undef INTERNAL_SYSCALL_RAW diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index ec2128b5ab..c8f1793ddf 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -17,7 +17,6 @@ GLIBC_2.0 __pthread_mutexattr_init F GLIBC_2.0 __pthread_mutexattr_settype F GLIBC_2.0 __pthread_once F GLIBC_2.0 __pthread_setspecific F -GLIBC_2.0 __send F GLIBC_2.0 __sigaction F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -65,7 +64,6 @@ GLIBC_2.0 sem_init F GLIBC_2.0 sem_post F GLIBC_2.0 sem_trywait F GLIBC_2.0 sem_wait F -GLIBC_2.0 send F GLIBC_2.0 sigaction F GLIBC_2.0 siglongjmp F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist index 06e013f4a3..1d40b1c972 100644 --- a/sysdeps/unix/sysv/linux/arc/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist @@ -37,7 +37,6 @@ GLIBC_2.32 __pthread_unregister_cancel_restore F GLIBC_2.32 __pthread_unwind_next F GLIBC_2.32 __pwrite64 F GLIBC_2.32 __res_state F -GLIBC_2.32 __send F GLIBC_2.32 __sigaction F GLIBC_2.32 _pthread_cleanup_pop F GLIBC_2.32 _pthread_cleanup_pop_restore F @@ -182,7 +181,6 @@ GLIBC_2.32 sem_timedwait F GLIBC_2.32 sem_trywait F GLIBC_2.32 sem_unlink F GLIBC_2.32 sem_wait F -GLIBC_2.32 send F GLIBC_2.32 sigaction F GLIBC_2.32 thrd_create F GLIBC_2.32 thrd_detach F diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist index 6abba5736d..31fa48cb8a 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist @@ -72,7 +72,6 @@ GLIBC_2.4 __pthread_unregister_cancel_restore F GLIBC_2.4 __pthread_unwind_next F GLIBC_2.4 __pwrite64 F GLIBC_2.4 __res_state F -GLIBC_2.4 __send F GLIBC_2.4 __sigaction F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -191,6 +190,5 @@ GLIBC_2.4 sem_timedwait F GLIBC_2.4 sem_trywait F GLIBC_2.4 sem_unlink F GLIBC_2.4 sem_wait F -GLIBC_2.4 send F GLIBC_2.4 sigaction F GLIBC_2.4 siglongjmp F diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist index 6abba5736d..31fa48cb8a 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist @@ -72,7 +72,6 @@ GLIBC_2.4 __pthread_unregister_cancel_restore F GLIBC_2.4 __pthread_unwind_next F GLIBC_2.4 __pwrite64 F GLIBC_2.4 __res_state F -GLIBC_2.4 __send F GLIBC_2.4 __sigaction F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -191,6 +190,5 @@ GLIBC_2.4 sem_timedwait F GLIBC_2.4 sem_trywait F GLIBC_2.4 sem_unlink F GLIBC_2.4 sem_wait F -GLIBC_2.4 send F GLIBC_2.4 sigaction F GLIBC_2.4 siglongjmp F diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist index 9e1fbdb969..858fbaaf80 100644 --- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist @@ -37,7 +37,6 @@ GLIBC_2.29 __pthread_unregister_cancel_restore F GLIBC_2.29 __pthread_unwind_next F GLIBC_2.29 __pwrite64 F GLIBC_2.29 __res_state F -GLIBC_2.29 __send F GLIBC_2.29 __sigaction F GLIBC_2.29 _pthread_cleanup_pop F GLIBC_2.29 _pthread_cleanup_pop_restore F @@ -176,7 +175,6 @@ GLIBC_2.29 sem_timedwait F GLIBC_2.29 sem_trywait F GLIBC_2.29 sem_unlink F GLIBC_2.29 sem_wait F -GLIBC_2.29 send F GLIBC_2.29 sigaction F GLIBC_2.29 thrd_create F GLIBC_2.29 thrd_detach F diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist index 8c729752d0..199f1244d0 100644 --- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist @@ -39,7 +39,6 @@ GLIBC_2.2 __pthread_rwlock_wrlock F GLIBC_2.2 __pthread_setspecific F GLIBC_2.2 __pwrite64 F GLIBC_2.2 __res_state F -GLIBC_2.2 __send F GLIBC_2.2 __sigaction F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -142,7 +141,6 @@ GLIBC_2.2 sem_timedwait F GLIBC_2.2 sem_trywait F GLIBC_2.2 sem_unlink F GLIBC_2.2 sem_wait F -GLIBC_2.2 send F GLIBC_2.2 sigaction F GLIBC_2.2 siglongjmp F GLIBC_2.2.3 __libpthread_version_placeholder F diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist index aa748acf8f..40685d5f51 100644 --- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist @@ -17,7 +17,6 @@ GLIBC_2.0 __pthread_mutexattr_init F GLIBC_2.0 __pthread_mutexattr_settype F GLIBC_2.0 __pthread_once F GLIBC_2.0 __pthread_setspecific F -GLIBC_2.0 __send F GLIBC_2.0 __sigaction F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -65,7 +64,6 @@ GLIBC_2.0 sem_init F GLIBC_2.0 sem_post F GLIBC_2.0 sem_trywait F GLIBC_2.0 sem_wait F -GLIBC_2.0 send F GLIBC_2.0 sigaction F GLIBC_2.0 siglongjmp F GLIBC_2.1 __libc_allocate_rtsig F diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist index 479dfb394d..2787631dca 100644 --- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist @@ -39,7 +39,6 @@ GLIBC_2.2 __pthread_rwlock_wrlock F GLIBC_2.2 __pthread_setspecific F GLIBC_2.2 __pwrite64 F GLIBC_2.2 __res_state F -GLIBC_2.2 __send F GLIBC_2.2 __sigaction F GLIBC_2.2 _pthread_cleanup_pop F GLIBC_2.2 _pthread_cleanup_pop_restore F @@ -142,7 +141,6 @@ GLIBC_2.2 sem_timedwait F GLIBC_2.2 sem_trywait F GLIBC_2.2 sem_unlink F GLIBC_2.2 sem_wait F -GLIBC_2.2 send F GLIBC_2.2 sigaction F GLIBC_2.2 siglongjmp F GLIBC_2.2.3 __libpthread_version_placeholder F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist index 6abba5736d..31fa48cb8a 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist @@ -72,7 +72,6 @@ GLIBC_2.4 __pthread_unregister_cancel_restore F GLIBC_2.4 __pthread_unwind_next F GLIBC_2.4 __pwrite64 F GLIBC_2.4 __res_state F -GLIBC_2.4 __send F GLIBC_2.4 __sigaction F GLIBC_2.4 _pthread_cleanup_pop F GLIBC_2.4 _pthread_cleanup_pop_restore F @@ -191,6 +190,5 @@ GLIBC_2.4 sem_timedwait F GLIBC_2.4 sem_trywait F GLIBC_2.4 sem_unlink F GLIBC_2.4 sem_wait F -GLIBC_2.4 send F GLIBC_2.4 sigaction F GLIBC_2.4 siglongjmp F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist index aa748acf8f..40685d5f51 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist @@ -17,7 +17,6 @@ GLIBC_2.0 __pthread_mutexattr_init F GLIBC_2.0 __pthread_mutexattr_settype F GLIBC_2.0 __pthread_once F GLIBC_2.0 __pthread_setspecific F -GLIBC_2.0 __send F GLIBC_2.0 __sigaction F GLIBC_2.0 _pthread_cleanup_pop F GLIBC_2.0 _pthread_cleanup_pop_restore F @@ -65,7 +64,6 @@ GLIBC_2.0 sem_init F GLIBC_2.0 sem_post F GLIBC_2.0 sem_trywait F GLIBC_2.0 sem_wait F -GLIBC_2.0 send F GLIBC_2.0 sigaction F GLIBC_2.0 siglongjmp F GLIBC_2.1 __libc_allocat |
