binutils-gdb/ld/testsuite/ld-scripts/rgn-at5.d
Alan Modra a8c75b765e 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.
2017-02-16 23:09:38 +10:30

21 lines
591 B
Makefile

# name: rgn-at5
# source: rgn-at5.s
# ld: -T rgn-at5.t -z max-page-size=0x1000
# objdump: -w -h
# target: *-*-linux* *-*-gnu*
# xfail: rx-*-*
# FAILS on the RX because the linker has to set LMA == VMA for the
# Renesas loader.
.*: file format .*
Sections:
Idx +Name +Size +VMA +LMA +File off +Algn +Flags
0 .sec0 +0+4 +0+2000 +0+2000 +0+1000 +.*
1 .sec1 +0+4 +0+1000 +0+2004 +0+2000 +.*
2 .sec2 +0+4 +0+4000 +0+603c +0+[45]000 +.*
3 .sec3 +0+4 +0+5000 +0+5000 +0+[34]000 +.*
4 .sec4 +0+4 +0+2008 +0+2008 +0+[23]008 +.*
5 .sec5 +0+4 +0+200c +0+200c +0+[23]00c +.*
#pass