public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] allocate_once: Apply asm redirection before first use
@ 2022-11-01 13:09 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-11-01 13:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8161978f89c3454e1b70e08efd98923e6a317a56

commit 8161978f89c3454e1b70e08efd98923e6a317a56
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <maskray@google.com>

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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-01 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 13:09 [glibc] allocate_once: Apply asm redirection before first use Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).