diff options
author | Roland McGrath <roland@gnu.org> | 1996-03-19 21:10:11 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-03-19 21:10:11 +0000 |
commit | c224a18a9045610c4ec1e4d959f6a5dd6b117dd9 (patch) | |
tree | 3ec6bbc9ad25817511f08d4a10035d351d88f6bf /libc-symbols.h | |
parent | b20e47cb14ec8edccab7c722743a731e67280702 (diff) | |
download | glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.tar.gz glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.tar.xz glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.zip |
* config.make.in (weak-symbols): Variable removed.
* configure.in (--with-weak-symbols): Option removed. (NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE): New tests. * config.h.in (HAVE_WEAK_SYMBOLS): #undef removed. (NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE): New #undefs. * libc-symbols.h: Use them instead of HAVE_WEAK_SYMBOLS. * inet/inet_lnaof.c: Use u_int32_t instead of u_long. * inet/inet_mkadr.c: Likewise. * inet/inet_net.c: Likewise. * inet/inet_netof.c: Likewise. * inet/rcmd.c: Likewise. * inet/arpa/inet.h: Likewise. * inet/netinet/in.h: Likewise. * inet/netinet/tcp.h: Likewise. * inet/protocols/rwhod.h: Likewise. * inet/protocols/talkd.h: Likewise. * resolv/inet_addr.c: Likewise. * sunrpc/rpc/xdr.h (IXDR_GET_LONG, IXDR_PUT_LONG): change casts to u_int32_t (instead of u_long).
Diffstat (limited to 'libc-symbols.h')
-rw-r--r-- | libc-symbols.h | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/libc-symbols.h b/libc-symbols.h index bb5f54e16c..f7231f9c7c 100644 --- a/libc-symbols.h +++ b/libc-symbols.h @@ -27,14 +27,13 @@ Cambridge, MA 02139, USA. */ We include config.h which is generated by configure. It should define for us the following symbols: + * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'. + * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'. * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out, and for symbol set and warning messages extensions in a.out and ELF. - This implies HAVE_WEAK_SYMBOLS; set by --with-gnu-ld. - * HAVE_ELF if using ELF, which supports weak symbols. - This implies HAVE_WEAK_SYMBOLS; set by --with-elf. - - * HAVE_WEAK_SYMBOLS if weak symbols are available in the assembler and - linker being used. Set by --with-weak-symbols. + * HAVE_ELF if using ELF, which supports weak symbols using `.weak'. + * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'. + * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'. */ @@ -79,23 +78,14 @@ extern const char _libc_intl_domainname[]; /* */ -/* The symbols in all the user (non-_) macros are C symbols. Predefined - should be HAVE_WEAK_SYMBOLS and/or HAVE_ELF and/or HAVE_GNU_LD. - HAVE_WEAK_SYMBOLS is implied by the other two. HAVE_GNU_LD without - HAVE_ELF implies a.out. */ +/* The symbols in all the user (non-_) macros are C symbols. + HAVE_GNU_LD without HAVE_ELF implies a.out. */ -#ifndef HAVE_WEAK_SYMBOLS -#if defined (HAVE_ELF) || defined (HAVE_GNU_LD) +#if defined (HAVE_ASM_WEAK_DIRECTIVE) || defined (HAVE_ASM_WEAKEXT_DIRECTIVE) #define HAVE_WEAK_SYMBOLS #endif -#endif #ifndef __SYMBOL_PREFIX -#ifdef HAVE_ELF -#define NO_UNDERSCORES -#else -#include <sysdep.h> /* Should define NO_UNDERSCORES. */ -#endif #ifdef NO_UNDERSCORES #define __SYMBOL_PREFIX #else @@ -143,8 +133,21 @@ extern const char _libc_intl_domainname[]; #ifdef HAVE_WEAK_SYMBOLS + #ifdef ASSEMBLER +#ifdef HAVE_ASM_WEAKEXT_DIRECTIVE + +/* Define ALIAS as a weak alias for ORIGINAL. + If weak aliases are not available, this defines a strong alias. */ +#define weak_alias(original, alias) \ + .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) + +/* Declare SYMBOL to be weak. */ +#define weak_symbol(symbol) .weakext C_SYMBOL_NAME (symbol) + +#else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */ + /* Define ALIAS as a weak alias for ORIGINAL. If weak aliases are not available, this defines a strong alias. */ #define weak_alias(original, alias) \ @@ -154,12 +157,21 @@ extern const char _libc_intl_domainname[]; /* Declare SYMBOL to be weak. */ #define weak_symbol(symbol) .weak C_SYMBOL_NAME (symbol) -#else +#endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */ + +#else /* ! ASSEMBLER */ + +#ifdef HAVE_ASM_WEAKEXT_DIRECTIVE +#define weak_symbol(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol); +#define weak_alias(original, alias) \ + asm (".weakext " __SYMBOL_PREFIX #alias ", " __SYMBOL_PREFIX #original); +#else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */ #define weak_symbol(symbol) asm (".weak " __SYMBOL_PREFIX #symbol); #define weak_alias(original, alias) \ asm (".weak " __SYMBOL_PREFIX #alias "\n" \ __SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original); -#endif +#endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */ +#endif /* ! ASSEMBLER */ #else #define weak_alias(original, alias) strong_alias(original, alias) #define weak_symbol(symbol) /* Do nothing. */ |