diff options
author | H.J. Lu <hjl@lucon.org> | 2005-01-19 16:15:11 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2005-01-19 16:15:11 +0000 |
commit | 19872c0d551c3ceb9dfcad5b3fbde651ccc08ae6 (patch) | |
tree | 1a1664d3bc4be828d9df1eee512efb454a2f06ec /bfd/elflink.c | |
parent | d5ddfa61b4a50985d29562f52b878d71c6e21f36 (diff) | |
download | binutils-redhat-19872c0d551c3ceb9dfcad5b3fbde651ccc08ae6.tar.gz |
2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
PR 679
* elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
non-function symbols are local.
(_bfd_elf_symbol_refs_local_p): Likewise.
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 a973cd59a3..7a02d3415f 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2479,7 +2479,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, /* Proper resolution for function pointer equality may require that these symbols perhaps be resolved dynamically, even though we should be resolving them to the current module. */ - if (!ignore_protected) + if (!ignore_protected || h->type != STT_FUNC) binding_stays_local_p = TRUE; break; @@ -2542,6 +2542,10 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED) return TRUE; + /* STV_PROTECTED non-function symbols are local. */ + if (h->type != STT_FUNC) + return TRUE; + /* Function pointer equality tests may require that STV_PROTECTED symbols be treated as dynamic symbols, even when we know that the dynamic linker will resolve them locally. */ |