From 990c8ffd3a83232365f346413e394d4431875899 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 5 May 2021 17:15:57 +0200 Subject: nptl: Move sem_unlink into libc The symbol was moved using scripts/move-symbol-to-libc.py. A small adjust to the sem_unlink implementation is necessary to avoid a check-localplt failure. A placeholder symbol to keep the GLIBC_2.1.1 version alive in libpthread is added with this commit. Reviewed-by: Adhemerval Zanella --- nptl/Makefile | 2 +- nptl/Versions | 4 +++- nptl/libpthread-compat.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'nptl') diff --git a/nptl/Makefile b/nptl/Makefile index 9f73cf2434..665cd1f3d1 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -159,6 +159,7 @@ routines = \ sem_post \ sem_routines \ sem_timedwait \ + sem_unlink \ tpp \ unwind \ @@ -210,7 +211,6 @@ libpthread-routines = \ pthread_sigqueue \ pthread_timedjoin \ pthread_tryjoin \ - sem_unlink \ sem_wait \ vars \ version \ diff --git a/nptl/Versions b/nptl/Versions index f19c2355f1..20997aa706 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -92,6 +92,7 @@ libc { GLIBC_2.1.1 { sem_close; sem_open; + sem_unlink; } GLIBC_2.2 { __pthread_rwlock_destroy; @@ -269,6 +270,7 @@ libc { sem_open; sem_post; sem_timedwait; + sem_unlink; thrd_exit; tss_create; tss_delete; @@ -353,7 +355,7 @@ libpthread { } GLIBC_2.1.1 { - sem_unlink; + __libpthread_version_placeholder; } GLIBC_2.1.2 { diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c index 7b0427aaed..401fa6ad34 100644 --- a/nptl/libpthread-compat.c +++ b/nptl/libpthread-compat.c @@ -36,6 +36,10 @@ __libpthread_version_placeholder_1 (void) 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_1, GLIBC_2_1_2)) +compat_symbol (libpthread, __libpthread_version_placeholder_1, + __libpthread_version_placeholder, GLIBC_2_1_1); +#endif #if (SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_2)) compat_symbol (libpthread, __libpthread_version_placeholder_1, __libpthread_version_placeholder, GLIBC_2_1_2); -- cgit v1.2.3