aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-07-21 06:46:20 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-07-21 06:46:20 +0000
commit7e2294f9378d28e2645b2db1d23053755a603c5c (patch)
tree84a776f68fed867d5a032ff1637975db944264a1 /bfd/elf-bfd.h
parentf6d87cd6b1b39639e32019f0ad44f26e82f46811 (diff)
downloadgdb-7e2294f9378d28e2645b2db1d23053755a603c5c.zip
gdb-7e2294f9378d28e2645b2db1d23053755a603c5c.tar.gz
gdb-7e2294f9378d28e2645b2db1d23053755a603c5c.tar.bz2
* elf-bfd.h (ELF_COMMON_DEF_P): New.
* elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle common definitions. * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of _bfd_elf_symbol_refs_local_p. * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common symbols.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 94a847d..ee60894 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -218,6 +218,13 @@ struct elf_link_hash_entry
#define SYMBOL_CALLS_LOCAL(INFO, H) \
_bfd_elf_symbol_refs_local_p (H, INFO, 1)
+/* Common symbols that are turned into definitions don't have the
+ DEF_REGULAR flag set, so they might appear to be undefined. */
+#define ELF_COMMON_DEF_P(H) \
+ (((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 \
+ && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 \
+ && (H)->root.type == bfd_link_hash_defined)
+
/* Records local symbols to be emitted in the dynamic symbol table. */
struct elf_link_local_dynamic_entry