PR22829, objcopy/strip removes PT_GNU_RELRO from lld binaries
authorAlan Modra <amodra@gmail.com>
Mon, 12 Feb 2018 02:36:07 +0000 (13:06 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 13 Feb 2018 09:00:47 +0000 (19:30 +1030)
commitf2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f
tree4639f2a93997bb30a49c64b80213735b955aa176
parent387cd15b93fdca3a66bbda427c4e1d9340bfb532
PR22829, objcopy/strip removes PT_GNU_RELRO from lld binaries

lld lays out the relro segment differently to GNU ld, not bothering to
include the first few bytes of .got.plt and padding out to a page at
the end of the segment.  This patch teaches binutils to recognize the
different (and somewhat inferior) layout as valid.

bfd/
PR 22829
* elf.c (assign_file_positions_for_non_load_sections): Rewrite
PT_GNU_RELRO setup.
ld/
* testsuite/ld-x86-64/pr14207.d: Adjust relro p_filesz.
bfd/ChangeLog
bfd/elf.c
ld/ChangeLog
ld/testsuite/ld-x86-64/pr14207.d