aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-02-22 23:19:35 +0000
committerRoland McGrath <roland@gnu.org>1995-02-22 23:19:35 +0000
commite6964dd4e18685e98ed440317247705ca8b55cc5 (patch)
treefc47f6a82a9f340b38494a0d59a7864702c97b8d
parent0677a80cdf98418cfe641d27cfc492d7459c5b45 (diff)
downloadglibc-e6964dd4e18685e98ed440317247705ca8b55cc5.tar
glibc-e6964dd4e18685e98ed440317247705ca8b55cc5.tar.gz
glibc-e6964dd4e18685e98ed440317247705ca8b55cc5.tar.bz2
glibc-e6964dd4e18685e98ed440317247705ca8b55cc5.zip
(weak_symbol): New macro.
-rw-r--r--libc-symbols.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc-symbols.h b/libc-symbols.h
index b41c956efe..83773bfdc9 100644
--- a/libc-symbols.h
+++ b/libc-symbols.h
@@ -96,13 +96,18 @@ Cambridge, MA 02139, USA. */
#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) \
asm (".weak " __SYMBOL_PREFIX #alias "\n" \
__SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original);
#endif
#else
#define weak_alias(original, alias) strong_alias(original, alias)
+#define weak_symbol(symbol) /* Do nothing. */
#endif