From patchwork Sat Aug 12 12:05:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 22114 Received: (qmail 118595 invoked by alias); 12 Aug 2017 12:05:24 -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 118475 invoked by uid 89); 12 Aug 2017 12:05:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1C27B72D9D Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Date: Sat, 12 Aug 2017 14:05:19 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] NPTL: Remove internal_function from stack marking functions User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170812120519.0C8FC4027587E@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) These are called across DSO boundaries and therefore should use the ABI calling convention. 2017-08-12 Florian Weimer * elf/dl-support.c (_dl_make_stack_executable_hook): Remove internal_function. * nptl/allocatestack.c (__make_stacks_executable): Likewise. * nptl/pthreadP.h (__make_stacks_executable): Likewise. * sysdeps/generic/ldsodefs.h (_rtld_global): Remove internal_function from _dl_make_stack_executable_hook member. (_dl_make_stack_executable): Remove internal_function. * sysdeps/mach/hurd/dl-execstack.c (_dl_make_stack_executable): Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Likewise. diff --git a/elf/dl-support.c b/elf/dl-support.c index c22be854f4..48340f7959 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -181,8 +181,7 @@ ElfW(Word) _dl_stack_flags = DEFAULT_STACK_PERMS; /* If loading a shared object requires that we make the stack executable when it was not, we do it by calling this function. It returns an errno code or zero on success. */ -int (*_dl_make_stack_executable_hook) (void **) internal_function - = _dl_make_stack_executable; +int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable; /* Function in libpthread to wait for termination of lookups. */ diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index ce2e24af95..6d1bcaa294 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -784,7 +784,6 @@ __deallocate_stack (struct pthread *pd) int -internal_function __make_stacks_executable (void **stack_endp) { /* First the main thread's stack. */ diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 6e7d6ff09e..5f0c18299d 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -356,8 +356,7 @@ extern void __deallocate_stack (struct pthread *pd) extern void __reclaim_stacks (void) attribute_hidden; /* Make all threads's stacks executable. */ -extern int __make_stacks_executable (void **stack_endp) - internal_function attribute_hidden; +extern int __make_stacks_executable (void **stack_endp) attribute_hidden; /* longjmp handling. */ extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe); diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 1c0b9cb32e..55bb5e979e 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -377,7 +377,7 @@ struct rtld_global /* If loading a shared object requires that we make the stack executable when it was not, we do it by calling this function. It returns an errno code or zero on success. */ - EXTERN int (*_dl_make_stack_executable_hook) (void **) internal_function; + EXTERN int (*_dl_make_stack_executable_hook) (void **); /* Prevailing state of the stack, PF_X indicating it's executable. */ EXTERN ElfW(Word) _dl_stack_flags; @@ -632,7 +632,7 @@ extern size_t _dl_phnum; /* This is the initial value of GL(dl_make_stack_executable_hook). A threads library can change it. */ -extern int _dl_make_stack_executable (void **stack_endp) internal_function; +extern int _dl_make_stack_executable (void **stack_endp); rtld_hidden_proto (_dl_make_stack_executable) /* Variable pointing to the end of the stack (or close to it). This value diff --git a/sysdeps/mach/hurd/dl-execstack.c b/sysdeps/mach/hurd/dl-execstack.c index 1168df9262..51f0b9cc5b 100644 --- a/sysdeps/mach/hurd/dl-execstack.c +++ b/sysdeps/mach/hurd/dl-execstack.c @@ -26,7 +26,6 @@ extern struct hurd_startup_data *_dl_hurd_data attribute_hidden; so as to mprotect it. */ int -internal_function _dl_make_stack_executable (void **stack_endp) { /* Challenge the caller. */ diff --git a/sysdeps/unix/sysv/linux/dl-execstack.c b/sysdeps/unix/sysv/linux/dl-execstack.c index 3c4de1cb46..4fe81523f3 100644 --- a/sysdeps/unix/sysv/linux/dl-execstack.c +++ b/sysdeps/unix/sysv/linux/dl-execstack.c @@ -30,7 +30,6 @@ extern int __stack_prot attribute_relro attribute_hidden; int -internal_function _dl_make_stack_executable (void **stack_endp) { /* This gives us the highest/lowest page that needs to be changed. */