about summary refs log tree commit diff
path: root/nptl/pthread_sigmask.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-03-11 15:19:24 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-04-21 14:01:58 -0300
commitc6663fee4340291cd825fd8a88c219621f4eca9d (patch)
treef8dd659610efa8dcd8de0f4cbac48af46cd26a8d /nptl/pthread_sigmask.c
parent8645f624697afecfaa4d97ac584bc0a943cbca17 (diff)
downloadglibc-c6663fee4340291cd825fd8a88c219621f4eca9d.tar.gz
glibc-c6663fee4340291cd825fd8a88c219621f4eca9d.tar.xz
glibc-c6663fee4340291cd825fd8a88c219621f4eca9d.zip
nptl: Move pthread_sigmask implementation to libc
This is part of the libpthread removal project:

  <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html>

A new symbol version is added on libc to force loading failure
instead of lazy binding one for newly binaries with old loaders.

Checked with a build against all affected ABIs.
Diffstat (limited to 'nptl/pthread_sigmask.c')
-rw-r--r--nptl/pthread_sigmask.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nptl/pthread_sigmask.c b/nptl/pthread_sigmask.c
index c7860e02a5..035104453f 100644
--- a/nptl/pthread_sigmask.c
+++ b/nptl/pthread_sigmask.c
@@ -16,14 +16,13 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <signal.h>
 #include <pthreadP.h>
 #include <sysdep.h>
-
+#include <shlib-compat.h>
 
 int
-pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
+__pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
 {
   sigset_t local_newmask;
 
@@ -47,3 +46,9 @@ pthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask)
 	  ? INTERNAL_SYSCALL_ERRNO (result)
 	  : 0);
 }
+
+versioned_symbol (libc, __pthread_sigmask, pthread_sigmask, GLIBC_2_32);
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
+strong_alias (__pthread_sigmask, __pthread_sigmask_2);
+compat_symbol (libc, __pthread_sigmask_2, pthread_sigmask, GLIBC_2_0);
+#endif