diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2008-03-02 22:26:09 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2008-03-02 22:26:09 +0000 |
commit | d95edcac72feefeed187c0a1b56991a38cbfd99c (patch) | |
tree | db6fc942b84c8bad46df3c2971d0acebda357d33 | |
parent | 89200bf844501076657b4995444d08f4efc9e882 (diff) | |
download | gdb-d95edcac72feefeed187c0a1b56991a38cbfd99c.zip gdb-d95edcac72feefeed187c0a1b56991a38cbfd99c.tar.gz gdb-d95edcac72feefeed187c0a1b56991a38cbfd99c.tar.bz2 |
2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/5789
* elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
for hidden and local symbols.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ae142f1..b534ee8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2008-03-02 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/5789 + * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true + for hidden and local symbols. + 2008-03-03 Alan Modra <amodra@bigpond.net.au> * elf32-ppc.c (allocate_dynrelocs): Discard relocs on diff --git a/bfd/elflink.c b/bfd/elflink.c index 3a00a51..5139799 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2789,6 +2789,11 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, if (h == NULL) return TRUE; + /* STV_HIDDEN or STV_INTERNAL ones must be local. */ + if (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN + || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL) + 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)) @@ -2817,10 +2822,6 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) return FALSE; - /* However, STV_HIDDEN or STV_INTERNAL ones must be local. */ - if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED) - return TRUE; - hash_table = elf_hash_table (info); if (!is_elf_hash_table (hash_table)) return TRUE; |