aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-11-09 16:12:22 +0000
committerUlrich Drepper <drepper@redhat.com>2006-11-09 16:12:22 +0000
commit2692deea65f13becedc2ce283fbc97a3c139f165 (patch)
tree121c160e88030e5cc5769233d73d9f577dce2996 /include
parenta9a6bf36c159dc0eda7fc9a9985fb737da4be07a (diff)
downloadglibc-2692deea65f13becedc2ce283fbc97a3c139f165.zip
glibc-2692deea65f13becedc2ce283fbc97a3c139f165.tar.gz
glibc-2692deea65f13becedc2ce283fbc97a3c139f165.tar.bz2
* elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0cvs/fedora-glibc-20061109T1949
rather than r->r_brk. 2006-11-08 Jakub Jelinek <jakub@redhat.com> * elf/dl-load.c (decompose_rpath): Return bool rather than void. If l->l_name is on inhibit_rpath list, set sps->dirs to -1 and return false, otherwise return true. (cache_rpath): Return decompose_rpath return value. 2006-11-07 Jakub Jelinek <jakub@redhat.com> * include/libc-symbols.h (declare_symbol): Rename to... (declare_symbol_alias): ... this. Add ORIGINAL argument, imply strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes .size directive. * sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias changes. * sysdeps/gnu/siglist.c: Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/libc-symbols.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 9eabcbd..a2faeaf 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -294,27 +294,42 @@ requires at runtime the shared libraries from the glibc version used \
for linking")
#endif
-/* Declare SYMBOL to be TYPE (`function' or `object') and of SIZE bytes,
- when the assembler supports such declarations (such as in ELF).
+/* Declare SYMBOL to be TYPE (`function' or `object') of SIZE bytes
+ alias to ORIGINAL, when the assembler supports such declarations
+ (such as in ELF).
This is only necessary when defining something in assembly, or playing
funny alias games where the size should be other than what the compiler
thinks it is. */
-#define declare_symbol(symbol, type, size) \
- declare_symbol_1 (symbol, type, size)
+#define declare_symbol_alias(symbol, original, type, size) \
+ declare_symbol_alias_1 (symbol, original, type, size)
#ifdef ASM_TYPE_DIRECTIVE_PREFIX
# ifdef __ASSEMBLER__
-# define declare_symbol_1(symbol, type, size) \
+# define declare_symbol_alias_1(symbol, original, type, size) \
+ strong_alias (original, symbol); \
.type C_SYMBOL_NAME (symbol), \
- declare_symbol_1_paste (ASM_TYPE_DIRECTIVE_PREFIX, type), size
-# define declare_symbol_1_paste(a, b) declare_symbol_1_paste_1 (a,b)
-# define declare_symbol_1_paste_1(a,b) a##b
+ declare_symbol_alias_1_paste (ASM_TYPE_DIRECTIVE_PREFIX, type); \
+ .size C_SYMBOL_NAME (symbol), size
+# define declare_symbol_alias_1_paste(a, b) \
+ declare_symbol_alias_1_paste_1 (a,b)
+# define declare_symbol_alias_1_paste_1(a,b) a##b
# else /* Not __ASSEMBLER__. */
-# define declare_symbol_1(symbol, type, size) \
- asm (".type " __SYMBOL_PREFIX #symbol ", " \
- declare_symbol_1_stringify (ASM_TYPE_DIRECTIVE_PREFIX) #type \
+# define declare_symbol_alias_1(symbol, original, type, size) \
+ asm (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \
+ " " __SYMBOL_PREFIX #symbol \
+ "\n\t" declare_symbol_alias_1_alias (symbol, original) \
+ "\n\t.type " __SYMBOL_PREFIX #symbol ", " \
+ declare_symbol_alias_1_stringify (ASM_TYPE_DIRECTIVE_PREFIX) #type \
"\n\t.size " __SYMBOL_PREFIX #symbol ", " #size);
-# define declare_symbol_1_stringify(x) declare_symbol_1_stringify_1 (x)
-# define declare_symbol_1_stringify_1(x) #x
+# define declare_symbol_alias_1_stringify(x) \
+ declare_symbol_alias_1_stringify_1 (x)
+# define declare_symbol_alias_1_stringify_1(x) #x
+# ifdef HAVE_ASM_SET_DIRECTIVE
+# define declare_symbol_alias_1_alias(symbol, original) \
+ ".set " __SYMBOL_PREFIX #symbol ", " __SYMBOL_PREFIX #original
+# else
+# define declare_symbol_alias_1_alias(symbol, original) \
+ __SYMBOL_PREFIX #symbol " = " __SYMBOL_PREFIX #original
+# endif /* HAVE_ASM_SET_DIRECTIVE */
# endif /* __ASSEMBLER__ */
#else
# define declare_symbol_1(symbol, type, size) /* Nothing. */