diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-09 07:19:36 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-09 07:20:58 -0700 |
commit | 8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b (patch) | |
tree | 28c5463db324281b65b263b43db858dd10e59c43 /bfd/elfxx-x86.c | |
parent | 4e9ac44a8925c7da81735ef24beb5456a0c0fa24 (diff) | |
download | gdb-8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b.zip gdb-8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b.tar.gz gdb-8fbf0ba18c8a63bd4974086f6709b2bf050b0b0b.tar.bz2 |
x86: Don't check has_non_got_reloc
_bfd_x86_elf_link_symbol_references_local should depend only on symbol
references, not relocations, to work in check_relocs.
* elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
check has_non_got_reloc.
Diffstat (limited to 'bfd/elfxx-x86.c')
-rw-r--r-- | bfd/elfxx-x86.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index e056c3c..20b07f0 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -1701,15 +1701,14 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info, by linker version script. A weak undefined symbol is forced local if 1. It has non-default visibility. Or - 2. When building executable, it has non-GOT/non-PLT relocations - in text section or there is no dynamic linker. Or + 2. When building executable, there is no dynamic linker. Or 3. or "-z nodynamic-undefined-weak" is used. */ if (SYMBOL_REFERENCES_LOCAL (info, h) || (h->root.type == bfd_link_hash_undefweak && (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT || (bfd_link_executable (info) - && (htab->interp == NULL || eh->has_non_got_reloc)) + && htab->interp == NULL) || info->dynamic_undefined_weak == 0)) || ((h->def_regular || ELF_COMMON_DEF_P (h)) && h->versioned == unversioned |