diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-09 07:29:15 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-09 07:29:29 -0700 |
commit | c5bce5c69721af8dae5c607e085e545cdba33ab1 (patch) | |
tree | 2132bf4a5c083b2db7c0f54ee6aec6bb97068c0e /bfd/elf64-x86-64.c | |
parent | 8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b (diff) | |
download | gdb-c5bce5c69721af8dae5c607e085e545cdba33ab1.zip gdb-c5bce5c69721af8dae5c607e085e545cdba33ab1.tar.gz gdb-c5bce5c69721af8dae5c607e085e545cdba33ab1.tar.bz2 |
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.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 4faa78b..4371a16 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2766,10 +2766,7 @@ do_ifunc_pointer: } resolved_to_zero = (eh != NULL - && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, - X86_64_ELF_DATA, - eh->has_got_reloc, - eh)); + && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh)); /* When generating a shared object, the relocations handled here are copied into the output file to be resolved at run time. */ @@ -3985,10 +3982,7 @@ elf_x86_64_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, - X86_64_ELF_DATA, - eh->has_got_reloc, - eh); + local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh); if (h->plt.offset != (bfd_vma) -1) { |