aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-04-21 12:00:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-04-21 12:01:05 -0700
commit3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359 (patch)
tree94a9137c5a3cfabb589c090994f03fd98704ed66 /ld/testsuite/ld-elf/readelf.exp
parentrelease branch: Fix: --enable-werror (diff)
downloadbinutils-gdb-3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359.tar.gz
binutils-gdb-3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359.tar.bz2
binutils-gdb-3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359.zip
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.
Diffstat (limited to 'ld/testsuite/ld-elf/readelf.exp')
-rw-r--r--ld/testsuite/ld-elf/readelf.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elf/readelf.exp b/ld/testsuite/ld-elf/readelf.exp
index 92ca1c508a5..6831c191865 100644
--- a/ld/testsuite/ld-elf/readelf.exp
+++ b/ld/testsuite/ld-elf/readelf.exp
@@ -43,7 +43,7 @@ if [check_shared_lib_support] {
run_ld_link_tests [list \
[list \
"readelf version information" \
- "$LFLAGS -e 0 --export-dynamic -T ver_def.ld\
+ "$LFLAGS --no-dynamic-linker -e 0 --export-dynamic -T ver_def.ld\
--version-script=ver_def.ver" \
"" "" \
{ver_def.s} \