aboutsummaryrefslogtreecommitdiff
path: root/ld/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-05-11 14:34:48 +0930
committerAlan Modra <amodra@gmail.com>2018-05-12 16:03:44 +0930
commit9933dc52736dd349503e00a68cd0b9be4388f5a9 (patch)
tree7ba01b8f0f8c24ef86901868989788aebc7b1e75 /ld/ChangeLog
parentc64c5aae285146dce98f651d175f2ad1a437074f (diff)
downloadgdb-9933dc52736dd349503e00a68cd0b9be4388f5a9.zip
gdb-9933dc52736dd349503e00a68cd0b9be4388f5a9.tar.gz
gdb-9933dc52736dd349503e00a68cd0b9be4388f5a9.tar.bz2
PR20659, Objcopy and change section lma failing
Sections may well belong in multiple segments. The testcase in the PR saw an allocated section being assigned to an ABIFLAGS segment, then not being assigned to a LOAD segment because it had already been handled. To fix that particular problem this patch sets and tests segment_mark only for LOAD segments. I kept the segment_mark test for LOAD segments because I think there may otherwise be a problem with zero size sections. A few other problems showed up with the testcase. Some targets align .dynamic, resulting in the test failing with "section .dynamic lma 0x800000c0 adjusted to 0x800000cc" and similar messages. I've tried to handle that with some more hacks to the segment lma, which do the right thing for the testcase, but may well fail in other situations. I've also removed the tests of segment lma (p_paddr) and code involved in deciding that an adjusted segment no longer covers the file or program headers. Those test can't be correct in the face of objcopy --change-section-lma. It may be necessary to reinstate the tests but do them modulo page size, but we'll see how this goes. PR 20659 bfd/ * elf.c (rewrite_elf_program_header): Use segment_mark only for PT_LOAD headers. Delete first_matching_lma and first_suggested_lma. Instead make matching_lma and suggested_lma pointers to the sections. Align section vma and lma calculated from segment. Don't clear includes_phdrs or includes_filehdr based on p_paddr test. Try to handle alignment padding before first section by adjusting new segment lma down. Adjust PT_PHDR map p_paddr. ld/ * testsuite/ld-elf/changelma.d, * testsuite/ld-elf/changelma.lnk, * testsuite/ld-elf/changelma.s: New test.
Diffstat (limited to 'ld/ChangeLog')
-rw-r--r--ld/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0cbb953..3360959 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2018-05-12 Alan Modra <amodra@gmail.com>
+
+ PR 20659
+ * testsuite/ld-elf/changelma.d,
+ * testsuite/ld-elf/changelma.lnk,
+ * testsuite/ld-elf/changelma.s: New test.
+
2018-05-09 2018-05-02 Dimitar Dimitrov <dimitar@dinux.eu>
* scripttempl/pru.sc: Add LD sections to allow linking TI