diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-10-25 10:42:16 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-11-01 09:51:10 -0300 |
commit | 8161978f89c3454e1b70e08efd98923e6a317a56 (patch) | |
tree | 085c8b33bcaedd6a63034bd35df72a7fba9dcca6 /include | |
parent | 34b358eb03e592fadd9887dd3ef8c1cfaba39688 (diff) | |
download | glibc-8161978f89c3454e1b70e08efd98923e6a317a56.zip glibc-8161978f89c3454e1b70e08efd98923e6a317a56.tar.gz glibc-8161978f89c3454e1b70e08efd98923e6a317a56.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/allocate_once.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/allocate_once.h b/include/allocate_once.h index a487d64..d8cc088 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 */ |