Don't fudge p_vaddr when PHDR in segment
authorAlan Modra <amodra@gmail.com>
Mon, 12 Dec 2016 22:59:47 +0000 (09:29 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 12 Dec 2016 23:07:37 +0000 (09:37 +1030)
commit6392030005291f7c783da2247b63ae31dc8352e0
treee969ae75f49bf5133ea7e5d69b9b36598efa2560
parentea0ffd5be2dfd6ee696fc15294d7b2bf29f267a7
Don't fudge p_vaddr when PHDR in segment

RX does horrible fudges to PT_LOAD p_vaddr, that affect the testsuite
and mean the target won't support dynamic objects.  The latter
probably doesn't matter too much since RX is an embedded target, but
it's easy to stop some of the fudges in order to reduce special cases
for RX in the testsuite.  The changes make sense in isolation too.

bfd/
* elf32-rx.c (elf32_rx_modify_program_headers): Don't adjust
segments that include the ELF file header or program headers.
ld/
* testsuite/ld-elf/flags1.d: Run for RX.
* testsuite/ld-scripts/phdrs.exp: Likewise.
* testsuite/ld-scripts/pr14962.d: Likewise.
* testsuite/ld-scripts/pr14962-2.d: Likewise.
bfd/ChangeLog
bfd/elf32-rx.c
ld/ChangeLog
ld/testsuite/ld-elf/flags1.d
ld/testsuite/ld-scripts/phdrs.exp
ld/testsuite/ld-scripts/pr14962-2.d
ld/testsuite/ld-scripts/pr14962.d