]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Do not choose a non-ELF format input file to hold the linker created GOT sections.
authorNick Clifton <nickc@redhat.com>
Mon, 7 Aug 2017 09:09:51 +0000 (10:09 +0100)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 11 Aug 2017 15:17:01 +0000 (08:17 -0700)
commit4a1c35c0165f9cbcc63d3af93574b2f6c4544eb7
tree1a51dabf332f6d8a3c86e191d9667c6f914e23ef
parent916d667a1ca0084fb6cab8f09e580df7ea43c78b
Do not choose a non-ELF format input file to hold the linker created GOT sections.

bfd/

PR 21884
* elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
has not been set then use the bfd returned by
_bfd_elf_link_setup_gnu_properties.  If that is null then search
through all the input bfds selecting the first normal, ELF format
one.
* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.

ld/

PR ld/21884
* testsuite/ld-i386/i386.exp: Run pr21884.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr21884.d: New file.
* testsuite/ld-i386/pr21884.t: Likewise.
* testsuite/ld-x86-64/pr21884.d: Likewise.
* testsuite/ld-x86-64/pr21884.t: Likewise.

(cherry picked from commit b7a18930e3925c4092bd975e95bc3603aa1418d9 and
 9593aade74f0da0c08a4ab55e4c59173b07b1f63)
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr21884.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr21884.t [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr21884.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr21884.t [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp