+2021-06-11 Alan Modra <amodra@gmail.com>
+
+ PR 27952
+ * elf-bfd.h (struct elf_obj_tdata): Add is_pie.
+ * elflink.c (elf_link_add_object_symbols): Set is_pie.
+
2021-06-09 Nick Clifton <nickc@redhat.com>
PR 27666
symbols. */
unsigned int bad_symtab : 1;
+ /* Set if DT_FLAGS_1 has DF_1_PIE set. */
+ unsigned int is_pie : 1;
+
/* Information grabbed from an elf core file. */
struct core_elf_obj_tdata *core;
unsigned int tagv = dyn.d_un.d_val;
audit = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
}
+ if (dyn.d_tag == DT_FLAGS_1)
+ elf_tdata (abfd)->is_pie = (dyn.d_un.d_val & DF_1_PIE) != 0;
}
free (dynbuf);
+2021-06-11 Alan Modra <amodra@gmail.com>
+
+ PR 27952
+ * ldelf.c (ldelf_after_open): Error on input PIEs too.
+
2021-06-09 Nick Clifton <nickc@redhat.com>
PR 27666
&& elf_tdata (abfd) != NULL
&& elf_tdata (abfd)->elf_header != NULL
/* FIXME: Maybe check for other non-supportable types as well ? */
- && elf_tdata (abfd)->elf_header->e_type == ET_EXEC)
+ && (elf_tdata (abfd)->elf_header->e_type == ET_EXEC
+ || (elf_tdata (abfd)->elf_header->e_type == ET_DYN
+ && elf_tdata (abfd)->is_pie)))
einfo (_("%F%P: cannot use executable file '%pB' as input to a link\n"),
abfd);
}