Replace hidden with versioned in elf_link_hash_entry
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 10 Aug 2015 14:57:40 +0000 (07:57 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 10 Aug 2015 14:57:57 +0000 (07:57 -0700)
commit422f11824b3abf6c71042e2ee3aed572f250fc89
treeb5aaf430dc6e3a835909515d350a21ebbd10878c
parent75fb7498c25ba89262867abe5340a8d38f1e19cd
Replace hidden with versioned in elf_link_hash_entry

This patch replaces the "hidden" field with the "versioned" field in
elf_link_hash_entry so that we can avoid calling strchr and strrchr if
the symbol is unversioned.

* elf-bfd.h (elf_symbol_version): New enum.
(elf_link_hash_entry): Replace hidden with versioned.
* elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
version if the symbol is unversioned.  Initialize versioned.
(_bfd_elf_add_default_symbol): Don't look for symbol version
if the symbol is unversioned or hidden.  Initialize versioned.
(elf_collect_hash_codes): Don't look for symbol version if the
symbol is unversioned.
(elf_collect_gnu_hash_codes): Likewise.
(bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
(_bfd_elf_link_hash_copy_indirect): Check versioned instead of
hidden.
(elf_link_output_extsym): Likewise.
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elflink.c