diff options
author | midipix <writeonce@midipix.org> | 2025-05-31 13:51:57 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-05-31 15:37:04 +0000 |
commit | 3ca0cfc97e4beec7b0d1261da2f94c948352e016 (patch) | |
tree | 34bc5ebf52aea8b69c69c93a1327cff7ad35cc0b | |
parent | 4bb11e1af48e7690755bd8a688ef67c92fe49074 (diff) | |
download | tpax-main.tar.bz2 tpax-main.tar.xz |
-rw-r--r-- | src/internal/tpax_visibility_impl.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/internal/tpax_visibility_impl.h b/src/internal/tpax_visibility_impl.h index 6812494..b606a5e 100644 --- a/src/internal/tpax_visibility_impl.h +++ b/src/internal/tpax_visibility_impl.h @@ -7,20 +7,20 @@ /* attribute not only redundant, but also tricky if not properly */ /* supported by the toolchain. */ /* */ -/* When targeting Midipix, __PE__, __dllexport and __dllimport are */ -/* always defined by the toolchain. Otherwise, the absnece of these */ -/* macros has been detected by sofort's ccenv.sh during ./configure, */ -/* and they have accordingly been added to CFLAGS_OS. */ +/* When targeting Midipix hosts, where elf-like visibility is fully */ +/* supported and may be detected via the __PE_VISIBILITY__ macro, */ +/* we utilize the attribute to render private symbols invisibile */ +/* to dlsym(), as well as reduce the size of the .gotstrs section. */ /**********************************************************************/ -#ifdef __PE__ +#if defined(__PE_VISIBILITY__) +#define tpax_hidden _ATTR_VISIBILITY_HIDDEN +#elif defined(__PE__) #define tpax_hidden -#else -#ifdef _ATTR_VISIBILITY_HIDDEN +#elif defined(_ATTR_VISIBILITY_HIDDEN) #define tpax_hidden _ATTR_VISIBILITY_HIDDEN #else #define tpax_hidden #endif -#endif #endif |