From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id E2040382EA2C; Fri, 28 Oct 2022 17:39:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2040382EA2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978742; bh=pPx7Z0XntGysfR9ODXb9Qya7JHU7dDAKoFc48WvIgvM=; h=From:To:Subject:Date:From; b=sAtDgkTGkm/MNmcoIUgOaR2LlqGO7bzphEqtf0OQkpiV3Y7ZAnbbKKopGk+mmBlST JjehTZxEfkUBRMcJxkuM+r5tR4tkphknDbC6tuorxsMyn2qF0v4sniUYBCFGpulbcT 6Q0o9oSosiKuUJgi+ho/JJ3NbTTa7r6hSM4f9av4= 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/azanella/clang] allocate_once: Apply asm redirection before first use X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 51f48cd64298cf9c6368e9994364f38f210597b3 X-Git-Newrev: de79b7f7a525e6084379a98710a1b82b2c3367eb Message-Id: <20221028173902.E2040382EA2C@sourceware.org> Date: Fri, 28 Oct 2022 17:39:02 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=de79b7f7a525e6084379a98710a1b82b2c3367eb commit de79b7f7a525e6084379a98710a1b82b2c3367eb 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 13. 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 */