]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf.c
No PT_INTERP when .interp is zero size
authorAlan Modra <amodra@gmail.com>
Fri, 5 Oct 2018 14:35:51 +0000 (00:05 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 8 Oct 2018 09:56:08 +0000 (20:26 +1030)
commit1b9e270b09c140464a7892c95c28eafa812c6b08
treec1326aba9138b6b7a19591010f6e272fc63149e1
parente0c3dfa2eebcf862d45b05f363a81f57ca30dead
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.
bfd/ChangeLog
bfd/elf.c
ld/ChangeLog
ld/testsuite/ld-elf/pr22423.d