aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-06 00:05:51 +0930
committerAlan Modra <amodra@gmail.com>2018-10-08 20:26:08 +1030
commit1b9e270b09c140464a7892c95c28eafa812c6b08 (patch)
treec1326aba9138b6b7a19591010f6e272fc63149e1 /ld
parente0c3dfa2eebcf862d45b05f363a81f57ca30dead (diff)
downloadbinutils-1b9e270b09c140464a7892c95c28eafa812c6b08.zip
binutils-1b9e270b09c140464a7892c95c28eafa812c6b08.tar.gz
binutils-1b9e270b09c140464a7892c95c28eafa812c6b08.tar.bz2
No PT_INTERP when .interp is zero size
Some targets don't set a default interpreter, resulting in an empty .interp section unless --dynamic-linker is passed to ld. A PT_INTERP without a path is rather useless. The testsuite change fixes a failure on microblaze-linux. bfd/ * elf.c (get_program_header_size): Don't count PT_INTERP if .interp is empty. (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if .interp is empty. ld/ * testsuite/ld-elf/pr22423.d: Pass --dynamic-linker to ld.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-elf/pr22423.d2
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b0c9eaa..7356c2b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-elf/pr22423.d: Pass --dynamic-linker to ld.
+
2018-10-05 Richard Henderson <rth@twiddle.net>
* testsuite/ld-or1k/or1k.exp: Add test cases for plt generation.
diff --git a/ld/testsuite/ld-elf/pr22423.d b/ld/testsuite/ld-elf/pr22423.d
index 70bd59e..9255c7e 100644
--- a/ld/testsuite/ld-elf/pr22423.d
+++ b/ld/testsuite/ld-elf/pr22423.d
@@ -1,6 +1,6 @@
#source: start.s
#readelf: -l -W
-#ld: -pie
+#ld: -pie --dynamic-linker=/usr/lib/ld.so.1
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#...