This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] respect HAVE_ASM_SET_DIRECTIVE when defining weak_alias()
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 4 May 2006 11:25:17 -0400
- Subject: [patch] respect HAVE_ASM_SET_DIRECTIVE when defining weak_alias()
- Geoman: IS A RETARD
the current libc-symbols.h code does not respect the HAVE_ASM_SET_DIRECTIVE
define when setting up the weak_alias() macros for assembler files. attached
patch fixes this.
-mike
2006-05-04 Bernd Schmidt <bernds_cb1@t-online.de>
* include/libc-symbols.h [HAVE_ASM_SET_DIRECTIVE]: Update weak_alias()
to utilize .set where appropriate.
--- include/libc-symbols.h
+++ include/libc-symbols.h
@@ -176,18 +176,31 @@
# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define weak_alias(original, alias) \
+# ifdef HAVE_ASM_SET_DIRECTIVE
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define weak_alias(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
+ .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
+# else
+# define weak_alias(original, alias) \
+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
+# endif
+# else /* ! HAVE_ASM_SET_DIRECTIVE */
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define weak_alias(original, alias) \
.weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
.weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-# else
-# define weak_alias(original, alias) \
+# else
+# define weak_alias(original, alias) \
.weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+# endif
# endif
-
# define weak_extern(symbol) \
.weak C_SYMBOL_NAME (symbol)