]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf-bfd.h
hppa -z relro again
authorAlan Modra <amodra@gmail.com>
Tue, 14 Feb 2017 00:15:51 +0000 (10:45 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 16 Feb 2017 12:39:38 +0000 (23:09 +1030)
commita8c75b765e57aaebb99d4e32e0f228835cff2737
tree2cea5382768b3cae9de0e04d151a7313d1024e77
parent247d6c4c14769b7576d810a381a68e35388ee874
hppa -z relro again

I misunderstood the hppa alias problem.  File offsets of segments need
to be such that no page is mapped twice with different permissions.
(Which still seems to me like something the kernel could fix, but
anyhow, this is not so difficult to achieve in ld.)

PR 21000
bfd/
* elf-bfd.h (struct elf_backend_data): Add no_page_alias.
* elfxx-target.h (elf_backend_no_page_alias): Define.
(elfNN_bed): Init new field.
* elf.c (assign_file_positions_for_load_sections): If no_page_alias
ensure PT_LOAD segment starts on a new page.
* elf32-hppa.c (elf_backend_no_page_alias): Define.
ld/
* testsuite/ld-elf/loadaddr1.d: Adjust for hppa file offsets.
* testsuite/ld-elf/loadaddr2.d: Likewise.
* testsuite/ld-elf/loadaddr3a.d: Likewise.
* testsuite/ld-scripts/rgn-at5.d: Likewise.
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf.c
bfd/elf32-hppa.c
bfd/elfxx-target.h
ld/ChangeLog
ld/testsuite/ld-elf/loadaddr1.d
ld/testsuite/ld-elf/loadaddr2.d
ld/testsuite/ld-elf/loadaddr3a.d
ld/testsuite/ld-scripts/rgn-at5.d