diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2001-04-09 03:24:32 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2001-04-09 03:24:32 +0000 |
commit | d954b0409407643ba3aa56a7b623e328a9538156 (patch) | |
tree | 9cd806891889aac5e7755b928e3d11046c6adf66 | |
parent | 7700434b5c52c609453111e16e49a2708d699041 (diff) | |
download | gdb-d954b0409407643ba3aa56a7b623e328a9538156.zip gdb-d954b0409407643ba3aa56a7b623e328a9538156.tar.gz gdb-d954b0409407643ba3aa56a7b623e328a9538156.tar.bz2 |
* elflink.h (elf_fix_symbol_flags): For non-default visibilities,
only hide symbols marked STV_INTERNAL or STV_HIDDEN.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.h | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f26eacf..f16feaa 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-04-09 Hans-Peter Nilsson <hp@axis.com> + + * elflink.h (elf_fix_symbol_flags): For non-default visibilities, + only hide symbols marked STV_INTERNAL or STV_HIDDEN. + 2001-04-05 Steven J. Hill <sjhill@cotw.com> * config.bfd (mips*el*-*-linux-gnu*): Use traditional little diff --git a/bfd/elflink.h b/bfd/elflink.h index 9f15e9a..554713b 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -3515,12 +3515,16 @@ elf_fix_symbol_flags (h, eif) /* If -Bsymbolic was used (which means to bind references to global symbols to the definition within the shared object), and this symbol was defined in a regular object, then it actually doesn't - need a PLT entry. Likewise, if the symbol has any kind of - visibility (internal, hidden, or protected), it doesn't need a - PLT. */ + need a PLT entry, and we can accomplish that by forcing it local. + Likewise, if the symbol has hidden or internal visibility. + FIXME: It might be that we also do not need a PLT for other + 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 && eif->info->shared - && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other)) + && (eif->info->symbolic + || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL + || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) { struct elf_backend_data *bed; |