scummvm random work
[patches.git] / glibc-libc-symbols-set-support.patch
CommitLineData
5e993f12 12006-05-04 Bernd Schmidt <bernds_cb1@t-online.de>
2
3 * include/libc-symbols.h [HAVE_ASM_SET_DIRECTIVE]: Update weak_alias()
4 to utilize .set where appropriate.
5
6--- include/libc-symbols.h
7+++ include/libc-symbols.h
8@@ -176,18 +176,31 @@
9
10 # else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
11
12-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
13-# define weak_alias(original, alias) \
14+# ifdef HAVE_ASM_SET_DIRECTIVE
15+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
16+# define weak_alias(original, alias) \
17+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
18+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
19+ .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
20+ .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
21+# else
22+# define weak_alias(original, alias) \
23+ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
24+ .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
25+# endif
26+# else /* ! HAVE_ASM_SET_DIRECTIVE */
27+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
28+# define weak_alias(original, alias) \
29 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
30 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
31 .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
32 C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
33-# else
34-# define weak_alias(original, alias) \
35+# else
36+# define weak_alias(original, alias) \
37 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
38 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
39+# endif
40 # endif
41-
42 # define weak_extern(symbol) \
43 .weak C_SYMBOL_NAME (symbol)
44