aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-06-16 01:22:43 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-06-16 01:37:42 +0200
commit57e1651557e833744d345deff0cd595b31e621ff (patch)
treeb5ef98de554bd8a2430860f5bc2591893c437f7d
parentfaf7bbc2d051f7351af5761e3f84f1c3c8b6479f (diff)
downloadglibc-57e1651557e833744d345deff0cd595b31e621ff.zip
glibc-57e1651557e833744d345deff0cd595b31e621ff.tar.gz
glibc-57e1651557e833744d345deff0cd595b31e621ff.tar.bz2
hurd: Avoid PLT ref for __pthread_get_cleanup_stack
* 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.
-rw-r--r--ChangeLog9
-rw-r--r--htl/pt-cleanup.c4
-rw-r--r--htl/pt-exit.c2
-rw-r--r--sysdeps/htl/pthread-functions.h3
-rw-r--r--sysdeps/htl/pthreadP.h1
5 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a2e082..390c2a1 100644
--- 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>
diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c
index 1b860c7..b4a9834 100644
--- a/htl/pt-cleanup.c
+++ b/htl/pt-cleanup.c
@@ -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)
diff --git a/htl/pt-exit.c b/htl/pt-exit.c
index cb62f47..823e09e 100644
--- a/htl/pt-exit.c
+++ b/htl/pt-exit.c
@@ -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);
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index a0d06cc..bb901e3 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -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 *);
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 6c9aa6c..3fcb811 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -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)