diff options
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r-- | include/libc-symbols.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h index cff465788..7c680cd9c 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -273,6 +273,31 @@ link_warning (name, \ "warning: " #name " is not implemented and will always fail") +/* Handling on non-exported internal names. We have to do this only + for shared code. */ +#ifdef SHARED +# define INTUSE(name) name##_internal +# define INTDEF(name) strong_alias (name, name##_internal) +# define INTVARDEF(name) \ + _INTVARDEF (name, name##_internal) +# if defined HAVE_VISIBILITY_ATTRIBUTE +# define _INTVARDEF(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name), \ + visibility ("hidden"))); +# else +# define _INTVARDEF(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((alias (#name))); +# endif +# define INTDEF2(name, newname) strong_alias (name, newname##_internal) +# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal) +#else +# define INTUSE(name) name +# define INTDEF(name) +# define INTVARDEF(name) +# define INTDEF2(name, newname) +# define INTVARDEF2(name, newname) +#endif + /* The following macros are used for PLT bypassing within libc.so (and if needed other libraries similarly). First of all, you need to have the function prototyped somewhere, @@ -416,7 +441,7 @@ .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \ C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original) # else -# define strong_alias(original, alias) \ +# define hidden_strong_alias(original, alias) \ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \ .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) |