From patchwork Sat Jun 16 09:22:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 930357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93302-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="XmkUFEK0"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 417Bhq1QsGz9s4V for ; Sat, 16 Jun 2018 19:22:33 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=dVPMG4JRRIQfMo2Wi5swKYTjCzqWWRCnSw0LeOAh3RqMQdCxhjHkH u0E4FwYjOZaKg7AKzOdUMP7HF0SHmpnMaIRGs7hbiTjrCeZp4C2xZn1XOWaCag3x yZJU76YSqnY+DWD6MCsKhMpH243wDjI7sDP7GWt5er99BT7VljWPTw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=C27/ZFIvvU5lHsIlILv/Z5wrads=; b=XmkUFEK0LJOUzTePhpY9C69rnOsr 239rOpGwIvPErLc/xrgzImwnuZDWXSu+wOtpnHmTg9l4A/08fb08ubUm2Wyss3dY 7w+oOsnnKfmPrCraFia36etR6Y46y5YtEwzn//HFuf21f++3AGjg0h4od02PilXY BtuQazdW2YGGHvs= Received: (qmail 72322 invoked by alias); 16 Jun 2018 09:22:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 72272 invoked by uid 89); 16 Jun 2018 09:22:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd, commited] hurd: Fix missing __pthread_get_cleanup_stack symbol Date: Sat, 16 Jun 2018 11:22:19 +0200 Message-Id: <20180616092219.718-1-samuel.thibault@ens-lyon.org> 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. --- ChangeLog | 13 ++++--------- htl/pt-cleanup.c | 4 ++-- htl/pt-exit.c | 2 +- htl/pt-join.c | 2 ++ sysdeps/htl/pthread-functions.h | 3 --- sysdeps/htl/pthreadP.h | 1 + 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fc3a71c21..363ae5bd77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,15 +8,10 @@ * sysdeps/mach/hurd/lseek.c: Include . * 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. + * 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. * sysdeps/mach/hurd/localplt.data (ld.so): Make ref to __open optional. * sysdeps/mach/include/mach-shortcuts-hidden.h: New file. * mach/shortcut.awk: Make syscall stubs include 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 diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h index bb901e3b7f..a0d06cc039 100644 --- a/sysdeps/htl/pthread-functions.h +++ b/sysdeps/htl/pthread-functions.h @@ -60,9 +60,6 @@ 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 3fcb811f49..132ac1718e 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -64,6 +64,7 @@ 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) attribute_hidden; #if IS_IN (libpthread) hidden_proto (__pthread_key_create)