From c5bce5c69721af8dae5c607e085e545cdba33ab1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 9 Sep 2017 07:29:15 -0700 Subject: x86: Update UNDEFINED_WEAK_RESOLVED_TO_ZERO Since the only information which SYMBOL_REFERENCES_LOCAL_P doesn't check is relocations, UNDEFINED_WEAK_RESOLVED_TO_ZERO only needs to check for relocations with SYMBOL_REFERENCES_LOCAL_P. * elf32-i386.c (elf_i386_relocate_section): Update usage of UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_i386_finish_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. (elf_x86_64_finish_dynamic_symbol): Likewise. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise. (_bfd_x86_elf_fixup_symbol): Likewise. --- bfd/elf32-i386.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'bfd/elf32-i386.c') diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 0100662..4337ab0 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2466,10 +2466,7 @@ do_ifunc_pointer: } resolved_to_zero = (eh != NULL - && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, - I386_ELF_DATA, - eh->has_got_reloc, - eh)); + && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh)); switch (r_type) { @@ -3623,9 +3620,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, /* We keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols in executable so that their references have value 0 at run-time. */ - local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, I386_ELF_DATA, - eh->has_got_reloc, - eh); + local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh); if (h->plt.offset != (bfd_vma) -1) { -- cgit v1.1