]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Require --no-dynamic-linker with -static -E/--dynamic-list
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 21 Apr 2017 19:00:55 +0000 (12:00 -0700)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 27 Apr 2017 15:52:58 +0000 (12:52 -0300)
commit576d151194c4d17a18152e1796db3776b92f6931
tree107acfdc2e0fc80f68e0c5a05b7e0c47801c90dd
parent11090cc0707e40498c9d0a88b16c414c8b86c277
Require --no-dynamic-linker with -static -E/--dynamic-list

When -static -E/--dynamic-list are passed to linker, linker may create
executable with dynamic sections which aren't supported by run-time.
We require --no-dynamic-linker together with -static -E/--dynamic-list
before adding dynamic symbol table to static executable.

bfd/

PR ld/19617
PR ld/21086
* elflink.c (elf_link_add_object_symbols): Require
--no-dynamic-linker with -E/--dynamic-list when creating
dynamic sections.

ld/

PR ld/19617
PR ld/21086
* testsuite/ld-elf/pr19617a.d: Pass --no-dynamic-linker to ld.
* testsuite/ld-elf/pr19617b.d: Likewise.
* testsuite/ld-elf/pr19617c.d: Likewise.
*testsuite/ld-i386/pr19636-4d.d: Likewise.
* testsuite/ld-elf/readelf.exp: Pass --no-dynamic-linker to ld
with --export-dynamic.
* testsuite/ld-elf/shared.exp: Pass --no-dynamic-linker to ld
with -E.

Cherry-pick of 3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359.

Change-Id: Ia85dd5cd783d60a63164ae34ea096d73806b9987
bfd/ChangeLog.linaro
bfd/elflink.c
ld/ChangeLog.linaro [new file with mode: 0644]
ld/testsuite/ld-elf/pr19617a.d
ld/testsuite/ld-elf/pr19617b.d
ld/testsuite/ld-elf/pr19617c.d
ld/testsuite/ld-elf/pr21086.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr21086.list [new file with mode: 0644]
ld/testsuite/ld-i386/pr19636-4d.d