2003-05-15 H.J. Lu <hongjiu.lu@intel.com>

* elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
	symbol.
This commit is contained in:
H.J. Lu 2003-05-15 14:54:47 +00:00
parent ae2f03ac16
commit c1be741f92
2 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
symbol.
2003-05-15 H.J. Lu <hongjiu.lu@intel.com> 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
* elflink.h (elf_link_check_versioned_symbol): Also allow * elflink.h (elf_link_check_versioned_symbol): Also allow

View File

@ -2427,17 +2427,14 @@ _bfd_elf_fix_symbol_flags (h, eif)
/* If -Bsymbolic was used (which means to bind references to global /* If -Bsymbolic was used (which means to bind references to global
symbols to the definition within the shared object), and this symbols to the definition within the shared object), and this
symbol was defined in a regular object, then it actually doesn't symbol was defined in a regular object, then it actually doesn't
need a PLT entry, and we can accomplish that by forcing it local. need a PLT entry. Likewise, if the symbol has non-default
Likewise, if the symbol has hidden or internal visibility. visibility. If the symbol has hidden or internal visibility, we
FIXME: It might be that we also do not need a PLT for other will force it local. */
non-hidden visibilities, but we would have to tell that to the
backend specifically; we can't just clear PLT-related data here. */
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0 if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
&& eif->info->shared && eif->info->shared
&& is_elf_hash_table (eif->info) && is_elf_hash_table (eif->info)
&& (eif->info->symbolic && (eif->info->symbolic
|| ELF_ST_VISIBILITY (h->other) == STV_INTERNAL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
|| ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{ {
struct elf_backend_data *bed; struct elf_backend_data *bed;