diff options
author | Roland McGrath <roland@gnu.org> | 1995-04-18 21:07:40 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-04-18 21:07:40 +0000 |
commit | d02907df8e29353eaeb357f498c7469f4f44eacf (patch) | |
tree | bd01a63de8f3f3c6515d1fb4eb8df4af723d25f3 /libc-symbols.h | |
parent | 65b3cbcba735abd13f10dfdc170ff61411003390 (diff) | |
download | glibc-d02907df8e29353eaeb357f498c7469f4f44eacf.tar.gz |
* libc-symbols.h (strong_alias_asm, strong_alias): Use
ASM_GLOBAL_DIRECTIVE on the alias.
Diffstat (limited to 'libc-symbols.h')
-rw-r--r-- | libc-symbols.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libc-symbols.h b/libc-symbols.h index a173b4d66d..1782737c93 100644 --- a/libc-symbols.h +++ b/libc-symbols.h @@ -79,37 +79,49 @@ Cambridge, MA 02139, USA. */ #endif #endif + /* Define ALIAS as a strong alias for ORIGINAL. */ #ifdef HAVE_ASM_SET_DIRECTIVE #define strong_alias_asm(original, alias) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias); \ .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) #ifdef ASSEMBLER #define strong_alias(original, alias) strong_alias_asm (original, alias) #else #define strong_alias(original, alias) \ - asm (".set " __SYMBOL_PREFIX #alias "," __SYMBOL_PREFIX #original); + asm (__string_1 (ASM_GLOBAL_DIRECTIVE) " " __SYMBOL_PREFIX #alias "\n" \ + ".set " __SYMBOL_PREFIX #alias "," __SYMBOL_PREFIX #original); #endif #else #define strong_alias_asm(original, alias) \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias); \ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) #ifdef ASSEMBLER #define strong_alias(original, alias) strong_alias_asm (original, alias) #else #define strong_alias(original, alias) \ - asm (__SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original); + asm (__string_1 (ASM_GLOBAL_DIRECTIVE) " " __SYMBOL_PREFIX #alias "\n" \ + __SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original); #endif #endif -/* Define ALIAS as a weak alias for ORIGINAL. - If weak aliases are not available, this defines a strong alias. */ +/* Helper macros used above. */ +#define __string_1(x) __string_0(x) +#define __string_0(x) #x + + #ifdef HAVE_WEAK_SYMBOLS #ifdef ASSEMBLER + +/* Define ALIAS as a weak alias for ORIGINAL. + If weak aliases are not available, this defines a strong alias. */ #define weak_alias(original, alias) \ .weak C_SYMBOL_NAME (alias); \ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) /* Declare SYMBOL to be weak. */ #define weak_symbol(symbol) .weak C_SYMBOL_NAME (symbol) + #else #define weak_symbol(symbol) asm (".weak " __SYMBOL_PREFIX #symbol); #define weak_alias(original, alias) \ |