about summary refs log tree commit diff
path: root/nptl/pthread_mutex_init.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-03 08:12:11 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-03 08:15:22 +0200
commitf44c9a24edf0dff4fd76562975533d58c1cd6dd4 (patch)
tree196eb57d4feb0faca29e34dbb413c76cb4c761b6 /nptl/pthread_mutex_init.c
parent17b67416c5ea65507c9b32aec1928afc88569eb2 (diff)
downloadglibc-f44c9a24edf0dff4fd76562975533d58c1cd6dd4.tar.gz
glibc-f44c9a24edf0dff4fd76562975533d58c1cd6dd4.tar.xz
glibc-f44c9a24edf0dff4fd76562975533d58c1cd6dd4.zip
nptl: Move mtx_init into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The calls to __pthread_mutex_init, __pthread_mutexattr_init,
__pthread_mutexattr_settype are now private and no longer need
to be exported.  This allows the removal of the newly added
GLIBC_2.34 symbol versions for those functions.

Also clean up some weak declarations in <libc-lockP.h> for
these functions.  They are not needed and potentially incorrect
for static linking of mtx_init.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/pthread_mutex_init.c')
-rw-r--r--nptl/pthread_mutex_init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c
index 328f7b08a7..d9d7523ea4 100644
--- a/nptl/pthread_mutex_init.c
+++ b/nptl/pthread_mutex_init.c
@@ -151,11 +151,13 @@ ___pthread_mutex_init (pthread_mutex_t *mutex,
 
   return 0;
 }
-versioned_symbol (libpthread, ___pthread_mutex_init, __pthread_mutex_init,
-		  GLIBC_2_34);
-libc_hidden_ver (___pthread_mutex_init, __pthread_mutex_init)
 versioned_symbol (libpthread, ___pthread_mutex_init, pthread_mutex_init,
 		  GLIBC_2_0);
+libc_hidden_ver (___pthread_mutex_init, __pthread_mutex_init)
+#ifndef SHARED
+strong_alias (___pthread_mutex_init, __pthread_mutex_init)
+#endif
+
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
 compat_symbol (libpthread, ___pthread_mutex_init, __pthread_mutex_init,
 	       GLIBC_2_0);