From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 45F533858012; Tue, 1 Nov 2022 13:09:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45F533858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667308145; bh=l3ar7uiT9Lp+0cNLXor3zibvzePbBqUlt6IPmaj4vvs=; h=From:To:Subject:Date:From; b=Q/yVMhZqhlaU0zBpWgl+Q3ZfYD7Jsq2VqhCv8gkxRtYL+aptPPG5ID97RAvm2a/no 4CDCeuDW0CKWne4Yj3GhsheFfC6ra9cSy/+d/akh2fd11d3qsKBLocxLv7TuHz6rhu uBFiL5npDlEpJqKm6Zog6Ba3bAcd2ltsI1Gya+j8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] allocate_once: Apply asm redirection before first use X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: 34b358eb03e592fadd9887dd3ef8c1cfaba39688 X-Git-Newrev: 8161978f89c3454e1b70e08efd98923e6a317a56 Message-Id: <20221101130905.45F533858012@sourceware.org> Date: Tue, 1 Nov 2022 13:09:05 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8161978f89c3454e1b70e08efd98923e6a317a56 commit 8161978f89c3454e1b70e08efd98923e6a317a56 Author: Adhemerval Zanella Date: Tue Oct 25 10:42:16 2022 -0300 allocate_once: Apply asm redirection before first use Compilers may not be able to apply asm redirections to functions after these functions are used for the first time, e.g. clang 15. Reviewed-by: Fangrui Song Diff: --- include/allocate_once.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/allocate_once.h b/include/allocate_once.h index a487d641d5..d8cc08824c 100644 --- a/include/allocate_once.h +++ b/include/allocate_once.h @@ -27,6 +27,9 @@ void *__libc_allocate_once_slow (void **__place, void (*__deallocate) (void *__closure, void *__ptr), void *__closure); +#ifndef _ISOMAC +libc_hidden_proto (__libc_allocate_once_slow) +#endif /* Return an a pointer to an allocated and initialized data structure. If this function returns a non-NULL value, the caller can assume @@ -88,8 +91,4 @@ allocate_once (void **__place, void *(*__allocate) (void *__closure), __closure); } -#ifndef _ISOMAC -libc_hidden_proto (__libc_allocate_once_slow) -#endif - #endif /* _ALLOCATE_ONCE_H */