diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-03-14 14:46:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-03-16 06:45:06 -0700 |
commit | f4be26838dc9937a4ae3e9cf4fbec50efd7786a2 (patch) | |
tree | ce206b7152f6f242e4a9e56e378b41f4ed5dd694 /gprofng/src | |
parent | 61a1f2e71118206dd700fc1ddf244b2178bf6610 (diff) | |
download | gdb-f4be26838dc9937a4ae3e9cf4fbec50efd7786a2.zip gdb-f4be26838dc9937a4ae3e9cf4fbec50efd7786a2.tar.gz gdb-f4be26838dc9937a4ae3e9cf4fbec50efd7786a2.tar.bz2 |
gprofng: Use symver attribute if available
Use symver attribute if available, instead of asm statement, to support
LTO build.
PR gprof/28962
* libcollector/dispatcher.c (timer_create@@GLIBC_2.3.3): Use
SYMVER_ATTRIBUTE.
(timer_create@GLIBC_2.2): Likewise.
(timer_create@GLIBC_2.2.5): Likewise.
(pthread_create@@GLIBC_2.1): Likewise.
(pthread_create@GLIBC_2.0): Likewise.
* libcollector/iotrace.c (open64@@GLIBC_2.2): Likewise.
(open64@GLIBC_2.1): Likewise.
(fopen@@GLIBC_2.1): Likewise.
(fopen@GLIBC_2.0): Likewise.
(fclose@@GLIBC_2.1): Likewise.
(fclose@GLIBC_2.0): Likewise.
(fdopen@@GLIBC_2.1): Likewise.
(fdopen@GLIBC_2.0): Likewise.
(pread@@GLIBC_2.2): Likewise.
(pread@GLIBC_2.1): Likewise.
(pwrite@@GLIBC_2.2): Likewise.
(pwrite@GLIBC_2.1): Likewise.
(pwrite64@@GLIBC_2.2): Likewise.
(pwrite64@GLIBC_2.1): Likewise.
(fgetpos@@GLIBC_2.2): Likewise.
(fgetpos@GLIBC_2.0): Likewise.
(fgetpos64@@GLIBC_2.2): Likewise.
(fgetpos64@GLIBC_2.1): Likewise.
(fsetpos@@GLIBC_2.2): Likewise.
(fsetpos@GLIBC_2.0): Likewise.
(fsetpos64@@GLIBC_2.2): Likewise.
(fsetpos64@GLIBC_2.1): Likewise.
* libcollector/linetrace.c (posix_spawn@@GLIBC_2.15): Likewise.
(posix_spawn@GLIBC_2.2): Likewise.
(posix_spawn@GLIBC_2.2.5): Likewise.
(posix_spawnp@@GLIBC_2.15): Likewise.
(posix_spawnp@GLIBC_2.2): Likewise.
(posix_spawnp@GLIBC_2.2.5): Likewise.
(popen@@GLIBC_2.1): Likewise.
(popen@GLIBC_2.0): Likewise.
(_popen@@GLIBC_2.1): Likewise.
(_popen@GLIBC_2.0): Likewise.
* libcollector/mmaptrace.c (dlopen@@GLIBC_2.1): Likewise.
(dlopen@GLIBC_2.0): Likewise.
* libcollector/synctrace.c (pthread_cond_wait@@GLIBC_2.3.2):
Likewise.
(pthread_cond_wait@GLIBC_2.0): Likewise.
(pthread_cond_wait@GLIBC_2.2.5): Likewise.
(pthread_cond_wait@GLIBC_2.2): Likewise.
(pthread_cond_timedwait@@GLIBC_2.3.2): Likewise.
(pthread_cond_timedwait@GLIBC_2.0): Likewise.
(pthread_cond_timedwait@GLIBC_2.2.5): Likewise.
(pthread_cond_timedwait@GLIBC_2.2): Likewise.
(sem_wait@@GLIBC_2.1): Likewise.
(sem_wait@GLIBC_2.0): Likewise.
* src/collector_module.h (SYMVER_ATTRIBUTE): New.
Diffstat (limited to 'gprofng/src')
-rw-r--r-- | gprofng/src/collector_module.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h index 512af7a..f608dab 100644 --- a/gprofng/src/collector_module.h +++ b/gprofng/src/collector_module.h @@ -220,4 +220,15 @@ extern "C" } #endif +#ifdef __has_attribute +# if __has_attribute (__symver__) +# define SYMVER_ATTRIBUTE(sym, symver) \ + __attribute__ ((__symver__ (#symver))) +# endif +#endif +#ifndef SYMVER_ATTRIBUTE +# define SYMVER_ATTRIBUTE(sym, symver) \ + __asm__(".symver " #sym "," #symver); +#endif + #endif /* _COLLECTOR_MODULE_H */ |