about summary refs log tree commit diff
path: root/nptl/cleanup.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 11:38:46 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 20:20:58 +0200
commit3ec8b1c7a921baa673ad9a33e0c63b4571915caa (patch)
tree6305b6505cef23c6bbffb2d44a92cb767c181445 /nptl/cleanup.c
parent870218fb30a83c071b53b036d1eb33df7e30397e (diff)
downloadglibc-3ec8b1c7a921baa673ad9a33e0c63b4571915caa.tar.gz
glibc-3ec8b1c7a921baa673ad9a33e0c63b4571915caa.tar.xz
glibc-3ec8b1c7a921baa673ad9a33e0c63b4571915caa.zip
nptl: Move __pthread_register_cancel, __pthread_unregister_cancel to libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Also clean up some unwinder linking leftover in the same spot
in nptl/pthreadP.h.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/cleanup.c')
-rw-r--r--nptl/cleanup.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/nptl/cleanup.c b/nptl/cleanup.c
index ad1651577b..040786fc44 100644
--- a/nptl/cleanup.c
+++ b/nptl/cleanup.c
@@ -18,11 +18,11 @@
 
 #include <stdlib.h>
 #include "pthreadP.h"
-
+#include <shlib-compat.h>
 
 void
 __cleanup_fct_attribute
-__pthread_register_cancel (__pthread_unwind_buf_t *buf)
+___pthread_register_cancel (__pthread_unwind_buf_t *buf)
 {
   struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
   struct pthread *self = THREAD_SELF;
@@ -34,15 +34,29 @@ __pthread_register_cancel (__pthread_unwind_buf_t *buf)
   /* Store the new cleanup handler info.  */
   THREAD_SETMEM (self, cleanup_jmp_buf, (struct pthread_unwind_buf *) buf);
 }
-hidden_def (__pthread_register_cancel)
+versioned_symbol (libc, ___pthread_register_cancel,
+                  __pthread_register_cancel, GLIBC_2_34);
+libc_hidden_ver (___pthread_register_cancel, __pthread_register_cancel)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_register_cancel,
+               __pthread_register_cancel, GLIBC_2_3_3);
+#endif
 
 
 void
 __cleanup_fct_attribute
-__pthread_unregister_cancel (__pthread_unwind_buf_t *buf)
+___pthread_unregister_cancel (__pthread_unwind_buf_t *buf)
 {
   struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;
 
   THREAD_SETMEM (THREAD_SELF, cleanup_jmp_buf, ibuf->priv.data.prev);
 }
-hidden_def (__pthread_unregister_cancel)
+versioned_symbol (libc, ___pthread_unregister_cancel,
+                  __pthread_unregister_cancel, GLIBC_2_34);
+libc_hidden_ver (___pthread_unregister_cancel, __pthread_unregister_cancel)
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_unregister_cancel,
+               __pthread_unregister_cancel, GLIBC_2_3_3);
+#endif