aboutsummaryrefslogtreecommitdiff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-03 23:43:53 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-03 23:43:53 +0000
commit40e94df30ac7196cc43607e523c50a17db0193bc (patch)
tree47bf19012ddf719a77b09802f500693d4b261969 /include/libc-symbols.h
parentf02392ec3c023fcb537cb5e63360b12a18b1292c (diff)
downloadglibc-40e94df30ac7196cc43607e523c50a17db0193bc.zip
glibc-40e94df30ac7196cc43607e523c50a17db0193bc.tar.gz
glibc-40e94df30ac7196cc43607e523c50a17db0193bc.tar.bz2
[HAVE_WEAK_SYMBOLS] (_weak_extern): Define using _Pragma(weak ...).
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index d7b26e2..ecea006 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -1,6 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-1998,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -116,24 +116,8 @@
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
-# define weak_extern(symbol) _weak_extern (symbol)
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define _weak_extern(symbol) \
- asm (".weakext " __SYMBOL_PREFIX #symbol "\n\t" \
- ".weakext ." __SYMBOL_PREFIX #symbol);
-# else
-# define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
-# endif
-# else
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define _weak_extern(symbol) \
- asm (".weak " __SYMBOL_PREFIX #symbol "\n\t" \
- ".weak ." __SYMBOL_PREFIX #symbol);
-# else
-# define _weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
-# endif
-# endif
+# define weak_extern(symbol) _weak_extern (weak symbol)
+# define _weak_extern(expr) _Pragma (#expr)
# else