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/elfxx-x86.h | |
parent | 8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b (diff) | |
download | binutils-c5bce5c69721af8dae5c607e085e545cdba33ab1.zip binutils-c5bce5c69721af8dae5c607e085e545cdba33ab1.tar.gz binutils-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/elfxx-x86.h')
-rw-r--r-- | bfd/elfxx-x86.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index 57f7862..2aee350 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -56,14 +56,12 @@ 2. Has no GOT/PLT relocation. Local undefined weak symbol is always resolved to 0. */ -#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, ID, GOT_RELOC, EH) \ +#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, EH) \ ((EH)->elf.root.type == bfd_link_hash_undefweak \ && (SYMBOL_REFERENCES_LOCAL_P ((INFO), &(EH)->elf) \ || (bfd_link_executable (INFO) \ - && (elf_x86_hash_table ((INFO), (ID))->interp == NULL \ - || !(GOT_RELOC) \ - || (EH)->has_non_got_reloc \ - || !(INFO)->dynamic_undefined_weak)))) + && (!(EH)->has_got_reloc \ + || (EH)->has_non_got_reloc)))) /* Should copy relocation be generated for a symbol. Don't generate copy relocation against a protected symbol defined in a shared |