diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2004-07-21 06:46:20 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2004-07-21 06:46:20 +0000 |
commit | 7e2294f9378d28e2645b2db1d23053755a603c5c (patch) | |
tree | 84a776f68fed867d5a032ff1637975db944264a1 /bfd/elflink.c | |
parent | f6d87cd6b1b39639e32019f0ad44f26e82f46811 (diff) | |
download | gdb-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/elflink.c')
-rw-r--r-- | bfd/elflink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 4920d9d..4fc24a3 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2456,9 +2456,13 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, if (h == NULL) return TRUE; + /* Common symbols that become definitions don't get the DEF_REGULAR + flag set, so test it first, and don't bail out. */ + if (ELF_COMMON_DEF_P (h)) + /* Do nothing. */; /* If we don't have a definition in a regular file, then we can't resolve locally. The sym is either undefined or dynamic. */ - if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) + else if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) return FALSE; /* Forced local symbols resolve locally. */ |