From f96a85e0fe83abdc30c73e6f01b995baf733e97b Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 16 Jun 2018 10:52:04 +0200 Subject: hurd: Fix missing __pthread_get_cleanup_stack symbol Rework 57e1651557e8 ("hurd: Avoid PLT ref for __pthread_get_cleanup_stack") to keep the __pthread_get_cleanup_stack symbol. * htl/pt-cleanup.c (__pthread_get_cleanup_stack): Rename to ___pthread_get_cleanup_stack. (__pthread_get_cleanup_stack): Remove hidden def, add alias. * 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): Remove hidden proto. * sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Add prototype. * sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Add hidden attribute. * htl/pt-join.c (__pthread_get_cleanup_stack): Define to ___pthread_get_cleanup_stack. --- htl/pt-cleanup.c | 4 ++-- htl/pt-exit.c | 2 +- htl/pt-join.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'htl') diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c index b4a9834dc1..1b860c7bf7 100644 --- a/htl/pt-cleanup.c +++ b/htl/pt-cleanup.c @@ -21,8 +21,8 @@ #include struct __pthread_cancelation_handler ** -__pthread_get_cleanup_stack (void) +___pthread_get_cleanup_stack (void) { return &_pthread_self ()->cancelation_handlers; } -libc_hidden_def (__pthread_get_cleanup_stack) +strong_alias (___pthread_get_cleanup_stack, __pthread_get_cleanup_stack) diff --git a/htl/pt-exit.c b/htl/pt-exit.c index 823e09e26e..cb62f474fa 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/htl/pt-join.c b/htl/pt-join.c index 061f421eae..befa0da5bc 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -22,6 +22,8 @@ #include +#define __pthread_get_cleanup_stack ___pthread_get_cleanup_stack + /* Make calling thread wait for termination of thread THREAD. Return the exit status of the thread in *STATUS. */ int -- cgit v1.2.1