x86: Use zero_undefweak in elf_x86_link_hash_entry
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Oct 2017 22:25:07 +0000 (15:25 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 6 Oct 2017 22:29:32 +0000 (15:29 -0700)
commit98b273dc13b1e45db8c66821efc9e514884f3c25
tree92329e76f47f0ae15386ce2669f43617c2666a9b
parentb3b7c423883ad8d8b81f166ad2d2d4b637086bc0
x86: Use zero_undefweak in elf_x86_link_hash_entry

Replace has_got_reloc and has_non_got_reloc in elf_x86_link_hash_entry
with zero_undefweak:

Bit 0: Symbol has no GOT nor PLT relocations.
Bit 1: Symbol has non-GOT/non-PLT relocations in text sections.

zero_undefweak is initialized to 1 and undefined weak symbol should be
resolved to 0 if zero_undefweak > 0.

* elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
and has_non_got_reloc with zero_undefweak.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
* elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
zero_undefweak to 1.
(_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
has_non_got_reloc with zero_undefweak.
* elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
has_got_reloc and has_non_got_reloc with zero_undefweak.
(elf_x86_link_hash_entry): Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
bfd/elfxx-x86.c
bfd/elfxx-x86.h
This page took 0.024185 seconds and 4 git commands to generate.