aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-02-12 13:06:07 +1030
committerAlan Modra <amodra@gmail.com>2018-02-13 19:30:47 +1030
commitf2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f (patch)
tree4639f2a93997bb30a49c64b80213735b955aa176 /ld
parent387cd15b93fdca3a66bbda427c4e1d9340bfb532 (diff)
downloadfsf-binutils-gdb-f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f.zip
fsf-binutils-gdb-f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f.tar.gz
fsf-binutils-gdb-f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f.tar.bz2
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-x86-64/pr14207.d2
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index cdcf950..236517a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-13 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-x86-64/pr14207.d: Adjust relro p_filesz.
+
2018-02-07 Alan Modra <amodra@gmail.com>
Revert 2018-01-17 Alan Modra <amodra@gmail.com>
diff --git a/ld/testsuite/ld-x86-64/pr14207.d b/ld/testsuite/ld-x86-64/pr14207.d
index b71d705..6830d03 100644
--- a/ld/testsuite/ld-x86-64/pr14207.d
+++ b/ld/testsuite/ld-x86-64/pr14207.d
@@ -13,7 +13,7 @@ Program Headers:
LOAD 0x000000 0x0000000000000000 0x0000000000000000 0x0001c8 0x0001c8 R 0x200000
LOAD 0x000b.8 0x0000000000200b.8 0x0000000000200b.8 0x0004.0 0x000c.8 RW 0x200000
DYNAMIC 0x000b.0 0x0000000000200b.0 0x0000000000200b.0 0x0001.0 0x0001.0 RW 0x8
- GNU_RELRO 0x000b.8 0x0000000000200b.8 0x0000000000200b.8 0x0004.8 0x0004.8 R 0x1
+ GNU_RELRO 0x000b.8 0x0000000000200b.8 0x0000000000200b.8 0x0004.0 0x0004.8 R 0x1
Section to Segment mapping:
Segment Sections...