mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
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.
This commit is contained in:
parent
4e9ac44a89
commit
8fbf0ba18c
@ -1,3 +1,8 @@
|
||||
2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
|
||||
check has_non_got_reloc.
|
||||
|
||||
2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/22115
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user