From 79a547b162657b3fa34d31917cc29f0e7af19e4c Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 5 Nov 2019 19:59:36 +0000 Subject: nptl: Move nanosleep implementation to libc Checked on x86_64-linux-gnu and powerpc64le-linux-gnu. I also checked the libpthread.so .gnu.version_d entries for every ABI affected and all of them contains the required versions (including for architectures which exports __nanosleep with a different version). Reviewed-by: Florian Weimer --- nptl/Makefile | 3 +-- nptl/Versions | 5 ++--- nptl/libpthread-compat.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index 73b2071..f9aadfd 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -44,7 +44,7 @@ pthread-compat-wrappers = \ write read close accept \ connect recv recvfrom send \ sendto fsync lseek lseek64 \ - msync nanosleep open open64 pause \ + msync open open64 pause \ pread pread64 pwrite pwrite64 \ tcdrain wait waitpid msgrcv msgsnd \ sigwait sigsuspend \ @@ -225,7 +225,6 @@ CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables -CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables diff --git a/nptl/Versions b/nptl/Versions index adbd4fa..5d6aedb 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -98,7 +98,7 @@ libpthread { # Cancellation points. close; __close; fcntl; __fcntl; read; __read; write; __write; accept; connect; __connect; recv; recvfrom; recvmsg; send; __send; sendmsg; sendto; - fsync; lseek; __lseek; msync; nanosleep; open; __open; pause; tcdrain; + fsync; lseek; __lseek; msync; open; __open; pause; tcdrain; system; wait; __wait; waitpid; # Hidden entry point (through macros). @@ -193,8 +193,7 @@ libpthread { } GLIBC_2.2.6 { - # Cancellation wrapper - __nanosleep; + __libpthread_version_placeholder; } GLIBC_2.3.2 { diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c index f1f0e09..7398f5e 100644 --- a/nptl/libpthread-compat.c +++ b/nptl/libpthread-compat.c @@ -26,7 +26,7 @@ version or later, the placeholder symbol is not needed because there are plenty of other symbols which populate those later versions. */ -#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) +#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2_6)) void attribute_compat_text_section __libpthread_version_placeholder (void) -- cgit v1.1