Fallout from "Reorder more powerpc64 sections for -z relro"
authorAlan Modra <amodra@gmail.com>
Tue, 28 Jul 2015 01:33:57 +0000 (11:03 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 28 Jul 2015 09:12:43 +0000 (18:42 +0930)
commite5654c0f8492e65b3e3ac5e1a2276856049eb1b1
tree365260c36ca9ad4abda3550eec856dcce63beba8
parentd6f1bafa2c05241b89c0303a9f6a2af89f51c39c
Fallout from "Reorder more powerpc64 sections for -z relro"

Commit 23283c1b changed the layout of some bss style sections on
powerpc64, but neglected to add a page gap before the third PT_LOAD
segment created by this reording.  Without a page gap we get two
PT_LOAD headers that overlap by one page in memory.  That shouldn't be
allowed because the dynamic loader will load garbage from the first
page of the last segment over the last page of the previous segment.

bfd/
* elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
segment for loaded sections after nonloaded sections if the
sections are on the same page.
ld/testsuite/
* ld-powerpc/elfv2so.d: Update
bfd/ChangeLog
bfd/elf.c
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/elfv2so.d