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
1 changed files with 6 additions and 0 deletions

View File

@ -231,6 +231,12 @@ inline Dest bit_cast(const Source& source) {
# define ATTRIBUTE_NOINLINE
#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
// very different ways. Here's the API we provide:
// 1) ATTRIBUTE_SECTION: put this with the declaration of all functions