introduced ATTRIBUTE_VISIBILITY_HIDDEN

So that we can disable elf symbol interposition for certain
perf-sensitive symbols.
This commit is contained in:
Aliaksey Kandratsenka 2014-11-09 14:40:30 -08:00
parent 6a6c49e1f5
commit 105c004d0c

View File

@ -231,6 +231,12 @@ inline Dest bit_cast(const Source& source) {
# define ATTRIBUTE_NOINLINE # define ATTRIBUTE_NOINLINE
#endif #endif
#if defined(HAVE___ATTRIBUTE__) && defined(__ELF__)
# define ATTRIBUTE_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
#else
# define ATTRIBUTE_VISIBILITY_HIDDEN
#endif
// Section attributes are supported for both ELF and Mach-O, but in // Section attributes are supported for both ELF and Mach-O, but in
// very different ways. Here's the API we provide: // very different ways. Here's the API we provide:
// 1) ATTRIBUTE_SECTION: put this with the declaration of all functions // 1) ATTRIBUTE_SECTION: put this with the declaration of all functions