mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt for regular symbols neither defined nor referenced in shared objects. This is a backport of rev. 1.101 (sourceware.org repository) to Binutils 2.15 which fixes the creation of bogus relocations in the PLT of Firefox and Thunderbird binaries and which in turn caused them to segfault in rtld(1). This is committed to the vendor branch as it doesn't represent a local change but the original vendor fix is from after elf_link_hash_flags was replaced with bitfields. PR: sparc64/89486 Approved by: maintainer timeout Obtained from: NetBSD MFC after: 1 week
This commit is contained in:
parent
362c19dcb0
commit
2ce641c5c4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/binutils/dist/; revision=159399
@ -1638,7 +1638,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
|
||||
|| h->root.type == bfd_link_hash_defweak)
|
||||
&& (h->root.u.def.section->flags & SEC_CODE) != 0))
|
||||
{
|
||||
if (! elf_hash_table (info)->dynamic_sections_created)
|
||||
if (! info->shared
|
||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
|
||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
|
||||
&& h->root.type != bfd_link_hash_undefweak
|
||||
&& h->root.type != bfd_link_hash_undefined)
|
||||
{
|
||||
/* This case can occur if we saw a WPLT30 reloc in an input
|
||||
file, but none of the input files were dynamic objects.
|
||||
|
Loading…
Reference in New Issue
Block a user