+2018-10-08 Alan Modra <amodra@gmail.com>
+
+ * 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.
+
2018-10-08 Alan Modra <amodra@gmail.com>
* elf32-spu.c (spu_elf_modify_segment_map): Don't insert
segs = 2;
s = bfd_get_section_by_name (abfd, ".interp");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size != 0)
{
/* If we have a loadable interpreter section, we need a
PT_INTERP segment. In this case, assume we also need a
the program headers and a PT_INTERP segment for the .interp
section. */
s = bfd_get_section_by_name (abfd, ".interp");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ if (s != NULL && (s->flags & SEC_LOAD) != 0 && s->size != 0)
{
amt = sizeof (struct elf_segment_map);
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+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.