From 78d1724d53e23fcbbf4df832015aae269b98249c Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 12 Mar 2021 16:42:39 -0300 Subject: 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. --- sysdeps/unix/sysv/linux/aarch64/libc.abilist | 1 + sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 2 -- sysdeps/unix/sysv/linux/aarch64/send.c | 9 +++++++++ sysdeps/unix/sysv/linux/aarch64/sysdep.h | 4 ---- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/aarch64/send.c (limited to 'sysdeps/unix/sysv/linux/aarch64') diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index bac7952..29f41b7 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 bbd24af..beeb6c6 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 0000000..db4d36b --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/send.c @@ -0,0 +1,9 @@ +#include + +#include + +#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 3059b8a..b019112 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 -- cgit v1.1