hurd: Avoid PLT ref for __pthread_get_cleanup_stack
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 15 Jun 2018 23:22:43 +0000 (01:22 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 15 Jun 2018 23:37:42 +0000 (01:37 +0200)
* htl/pt-cleanup.c (___pthread_get_cleanup_stack): Rename to
__pthread_get_cleanup_stack.
(__pthread_get_cleanup_stack): Remove alias, add hidden def.
* htl/pt-exit.c (__pthread_exit): Use __pthread_get_cleanup_stack
instead of ___pthread_get_cleanup_stack.
* sysdeps/htl/pthread-functions.h [libpthread]
(__pthread_get_cleanup_stack): Add hidden proto.
* sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove
prototype.

ChangeLog
htl/pt-cleanup.c
htl/pt-exit.c
sysdeps/htl/pthread-functions.h
sysdeps/htl/pthreadP.h

index 0a2e082d73143da20a67e234b45665ccb8d7e95a..390c2a1a9d3fefb5562e9e43ebff68bcbc171e1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,15 @@
        * sysdeps/mach/hurd/lseek.c: Include <errno.h>.
        * sysdeps/mach/hurd/lseek.c (__libc_lseek): Check that the value
        returned by __lseek64 can fit off_t, return EOVERFLOW otherwise.
+       * htl/pt-cleanup.c (___pthread_get_cleanup_stack): Rename to
+       __pthread_get_cleanup_stack.
+       (__pthread_get_cleanup_stack): Remove alias, add hidden def.
+       * htl/pt-exit.c (__pthread_exit): Use __pthread_get_cleanup_stack
+       instead of ___pthread_get_cleanup_stack.
+       * sysdeps/htl/pthread-functions.h [libpthread]
+       (__pthread_get_cleanup_stack): Add hidden proto.
+       * sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove
+       prototype.
 
 2018-06-15  Joseph Myers  <joseph@codesourcery.com>
 
index 1b860c7bf7cf778b6e653abb127331c8c50b35bd..b4a9834dc1c1b98b8c45682ae231f1e7789170dd 100644 (file)
@@ -21,8 +21,8 @@
 #include <pt-internal.h>
 
 struct __pthread_cancelation_handler **
-___pthread_get_cleanup_stack (void)
+__pthread_get_cleanup_stack (void)
 {
   return &_pthread_self ()->cancelation_handlers;
 }
-strong_alias (___pthread_get_cleanup_stack, __pthread_get_cleanup_stack)
+libc_hidden_def (__pthread_get_cleanup_stack)
index cb62f474fa82924c1811f18398ab85900c4b959f..823e09e26e08e023c33ac3d40cba1cf5059bd5d4 100644 (file)
@@ -41,7 +41,7 @@ __pthread_exit (void *status)
      disabled.  */
   __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate);
 
-  for (handlers = ___pthread_get_cleanup_stack ();
+  for (handlers = __pthread_get_cleanup_stack ();
        *handlers != NULL;
        *handlers = (*handlers)->__next)
     (*handlers)->__handler ((*handlers)->__arg);
index a0d06cc03998558cb834f35fa3a5731e83e85b7e..bb901e3b7f0300ed0268584e325c5a1f0dec67e0 100644 (file)
@@ -60,6 +60,9 @@ pthread_t __pthread_self (void);
 int __pthread_setcancelstate (int, int *);
 int __pthread_setcanceltype (int, int *);
 struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
+#if IS_IN (libpthread)
+hidden_proto (__pthread_get_cleanup_stack)
+#endif
 int __pthread_once (pthread_once_t *, void (*) (void));
 int __pthread_rwlock_rdlock (pthread_rwlock_t *);
 int __pthread_rwlock_wrlock (pthread_rwlock_t *);
index 6c9aa6cb759eab074c6a2fca49faa4f9d61b8c86..3fcb811f497c026c45fd4244035cc5566a30bbbb 100644 (file)
@@ -64,7 +64,6 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize);
 int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
                             size_t __stacksize);
 int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
-struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void);
 
 #if IS_IN (libpthread)
 hidden_proto (__pthread_key_create)