binutils-gdb/ld/testsuite/ld-tic6x
Alan Modra 64029e9368 Separate header PT_LOAD for -z separate-code
This patch, along with previous patches in the series, supports
putting the ELF file header and program headers in a PT_LOAD without
sections.

Logic governing whether headers a loaded has changed a little:  The
primary reason to include headers is now the presence of
SIZEOF_HEADERS in a linker script.  However, to support scripts that
may have reserved space for headers by hand, we continue to add
headers whenever the first section address is past the end of headers
modulo page size.

include/
	* bfdlink.h (struct bfd_link_info): Add load_phdrs field.
bfd/
	* elf-nacl.c (nacl_modify_segment_map): Cope with header PT_LOAD
	lacking sections.
	* elf.c (_bfd_elf_map_sections_to_segments): Assume file and
	program headers are required when info->load_phdrs.  Reorganize
	code handling program headers.  Generate a mapping without
	sections just for file and program headers when -z separate-code
	would indicate they should be on a different page to the first
	section.
ld/
	* ldexp.c (fold_name <SIZEOF_HEADERS>): Set link_info.load_phdrs.
	* testsuite/ld-elf/loadaddr1.d: Pass -z noseparate-code.
	* testsuite/ld-elf/loadaddr2.d: Likewise.
	* testsuite/ld-i386/vxworks2.sd: Adjust expected output.
	* testsuite/ld-powerpc/vxworks2.sd: Likewise.
	* testsuite/ld-elf/overlay.d: Remove spu xfail.
	* testsuite/ld-spu/ovl.lnk: Don't use SIZEOF_HEADERS.
	* testsuite/ld-tic6x/dsbt-be.ld: Likewise.
	* testsuite/ld-tic6x/dsbt-inrange.ld: Likewise.
	* testsuite/ld-tic6x/dsbt-overflow.ld: Likewise.
	* testsuite/ld-tic6x/dsbt.ld: Likewise.
2018-10-08 20:26:08 +10:30
..
attr-arch-c62x-c62x.d
attr-arch-c62x-c64x.d
attr-arch-c62x-c64x+.d
attr-arch-c62x-c67x.d
attr-arch-c62x-c67x+.d
attr-arch-c62x-c674x.d
attr-arch-c62x.s
attr-arch-c64x-c62x.d
attr-arch-c64x-c64x.d
attr-arch-c64x-c64x+.d
attr-arch-c64x-c67x.d
attr-arch-c64x-c67x+.d
attr-arch-c64x-c674x.d
attr-arch-c64x.s
attr-arch-c64x+-c62x.d
attr-arch-c64x+-c64x.d
attr-arch-c64x+-c64x+.d
attr-arch-c64x+-c67x.d
attr-arch-c64x+-c67x+.d
attr-arch-c64x+-c674x.d
attr-arch-c64x+.s
attr-arch-c67x-c62x.d
attr-arch-c67x-c64x.d
attr-arch-c67x-c64x+.d
attr-arch-c67x-c67x.d
attr-arch-c67x-c67x+.d
attr-arch-c67x-c674x.d
attr-arch-c67x.s
attr-arch-c67x+-c62x.d
attr-arch-c67x+-c64x.d
attr-arch-c67x+-c64x+.d
attr-arch-c67x+-c67x.d
attr-arch-c67x+-c67x+.d
attr-arch-c67x+-c674x.d
attr-arch-c67x+.s
attr-arch-c674x-c62x.d
attr-arch-c674x-c64x.d
attr-arch-c674x-c64x+.d
attr-arch-c674x-c67x.d
attr-arch-c674x-c67x+.d
attr-arch-c674x-c674x.d
attr-arch-c674x.s
attr-array-4-4.d
attr-array-4-8.d
attr-array-4-16.d
attr-array-4-48.d
attr-array-4-416.d
attr-array-4-816.d
attr-array-4.s
attr-array-8-4.d
attr-array-8-8.d
attr-array-8-16.d
attr-array-8-48.d
attr-array-8-416.d
attr-array-8-816.d
attr-array-8.s
attr-array-16-4.d
attr-array-16-8.d
attr-array-16-16.d
attr-array-16-48.d
attr-array-16-416.d
attr-array-16-816.d
attr-array-16.s
attr-array-48-4.d
attr-array-48-8.d
attr-array-48-16.d
attr-array-48-48.d
attr-array-48-416.d
attr-array-48-816.d
attr-array-48.s
attr-array-416-4.d
attr-array-416-8.d
attr-array-416-16.d
attr-array-416-48.d
attr-array-416-416.d
attr-array-416-816.d
attr-array-416.s
attr-array-816-4.d
attr-array-816-8.d
attr-array-816-16.d
attr-array-816-48.d
attr-array-816-416.d
attr-array-816-816.d
attr-array-816.s
attr-compatibility-gnu-gnu.d
attr-compatibility-gnu-other.d ELF linker messages 2018-02-26 09:29:15 +10:30
attr-compatibility-gnu.s
attr-compatibility-other-gnu.d ELF linker messages 2018-02-26 09:29:15 +10:30
attr-compatibility-other-other.d ELF linker messages 2018-02-26 09:29:15 +10:30
attr-compatibility-other.s
attr-conformance-10-10.d
attr-conformance-10-11.d
attr-conformance-10-none.d
attr-conformance-10.s
attr-conformance-11-10.d
attr-conformance-11-11.d
attr-conformance-11-none.d
attr-conformance-11.s
attr-conformance-none-10.d
attr-conformance-none-11.d
attr-conformance-none-none.d
attr-conformance-none.s
attr-dsbt-0.s
attr-dsbt-1.s
attr-dsbt-00.d
attr-dsbt-01.d
attr-dsbt-10.d
attr-dsbt-11.d
attr-pic-0.s
attr-pic-1.s
attr-pic-00.d
attr-pic-01.d
attr-pic-10.d
attr-pic-11.d
attr-pid-0.s
attr-pid-1.s
attr-pid-2.s
attr-pid-00.d
attr-pid-01.d
attr-pid-02.d
attr-pid-10.d
attr-pid-11.d
attr-pid-12.d
attr-pid-20.d
attr-pid-21.d
attr-pid-22.d
attr-stack-8-8.d
attr-stack-8-16.d
attr-stack-8-816.d
attr-stack-8.s
attr-stack-16-8.d
attr-stack-16-16.d
attr-stack-16-816.d
attr-stack-16.s
attr-stack-816-8.d
attr-stack-816-16.d
attr-stack-816-816.d
attr-stack-816.s
attr-unknown-1.d
attr-unknown-2.d
attr-unknown-3.d
attr-unknown-4.d
attr-unknown-5.d
attr-unknown-6.d
attr-unknown-7.d
attr-unknown-54-1.s
attr-unknown-55-a.s
attr-unknown-71-a.s
attr-unknown-71-b.s
attr-unknown-1000-1.s
attr-unknown-1000-2.s
attr-unknown-1024-1.s
attr-wchar-0.s
attr-wchar-1.s
attr-wchar-2.s
attr-wchar-00.d
attr-wchar-01.d
attr-wchar-02.d
attr-wchar-10.d
attr-wchar-11.d
attr-wchar-12.d
attr-wchar-20.d
attr-wchar-21.d
attr-wchar-22.d
common.d
common.ld
common.s
data-reloc-global-rel.d
data-reloc-global-rel.s
data-reloc-global.d
data-reloc-global.s
data-reloc-local-1.s
data-reloc-local-2.s
data-reloc-local-r-rel.d
data-reloc-local-r.d
data-reloc-local-rel.d
data-reloc-local.d
discard-unwind.ld
dsbt-be.ld Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
dsbt-index-error.d
dsbt-index.d
dsbt-index.s
dsbt-inrange.ld Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
dsbt-overflow.ld Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
dsbt.ld Separate header PT_LOAD for -z separate-code 2018-10-08 20:26:08 +10:30
ehtype-reloc-1-rel.d
ehtype-reloc-1.d
ehtype-reloc-1.s
generic.ld
got-reloc-global-addend-1.d
got-reloc-global-addend-1.s
got-reloc-global-addend-2.d
got-reloc-global-addend-2.s
got-reloc-global.s
got-reloc-inrange.d
got-reloc-local-1.s
got-reloc-local-2.s
got-reloc-local-r.d
got-reloc-overflow.d
mvk-reloc-global-rel.d
mvk-reloc-global-rel.s
mvk-reloc-global.d
mvk-reloc-global.s
mvk-reloc-local-1-rel.s
mvk-reloc-local-1.s
mvk-reloc-local-2-rel.s
mvk-reloc-local-2.s
mvk-reloc-local-r-rel.d
mvk-reloc-local-r.d
mvk-reloc-local-rel.d
mvk-reloc-local.d
pcr-reloc.d
pcr-reloc.s
pcrel-reloc-global-rel.d
pcrel-reloc-global.d
pcrel-reloc-global.s
pcrel-reloc-local-1.s
pcrel-reloc-local-2.s
pcrel-reloc-local-r-rel-rela.d
pcrel-reloc-local-r-rel.d
pcrel-reloc-local-r.d
pcrel-reloc-local-rel.d
pcrel-reloc-local.d
reloc-overflow-abs8-1.d
reloc-overflow-abs8-2.d
reloc-overflow-abs8.s
reloc-overflow-abs16-1.d
reloc-overflow-abs16-2.d
reloc-overflow-abs16.s
reloc-overflow-abs-s16-1.d
reloc-overflow-abs-s16-2.d
reloc-overflow-abs-s16.s
reloc-overflow-pcr-s7-1.d
reloc-overflow-pcr-s7-2.d
reloc-overflow-pcr-s7.s
reloc-overflow-pcr-s10-1.d
reloc-overflow-pcr-s10-2.d
reloc-overflow-pcr-s10.s
reloc-overflow-pcr-s12-1.d
reloc-overflow-pcr-s12-2.d
reloc-overflow-pcr-s12.s
reloc-overflow-pcr-s21-1.d
reloc-overflow-pcr-s21-2.d
reloc-overflow-pcr-s21.s
reloc-overflow-sbr-s16-1.d
reloc-overflow-sbr-s16-2.d
reloc-overflow-sbr-s16.s
reloc-overflow-sbr-u15-b-1.d
reloc-overflow-sbr-u15-b-2.d
reloc-overflow-sbr-u15-b.s
reloc-overflow-sbr-u15-h-1.d
reloc-overflow-sbr-u15-h-2.d
reloc-overflow-sbr-u15-h.s
reloc-overflow-sbr-u15-w-1.d
reloc-overflow-sbr-u15-w-2.d
reloc-overflow-sbr-u15-w.s
sbr-reloc-global-rel.d
sbr-reloc-global-rel.s
sbr-reloc-global.d
sbr-reloc-global.s
sbr-reloc-local-1-rel.s
sbr-reloc-local-1.s
sbr-reloc-local-2-rel.s
sbr-reloc-local-2.s
sbr-reloc-local-r-rel.d
sbr-reloc-local-r.d
sbr-reloc-local-rel.d
sbr-reloc-local.d
sbr.ld
shared-nopic.d
shared-nopid.d
shlib-1.dd
shlib-1.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-1.s
shlib-1.sd
shlib-1b.dd
shlib-1b.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-1b.sd
shlib-1r.dd
shlib-1r.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-1r.sd
shlib-1rb.dd
shlib-1rb.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-1rb.sd
shlib-2.s
shlib-app-1.dd
shlib-app-1.od
shlib-app-1.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-app-1.s
shlib-app-1.sd
shlib-app-1b.dd
shlib-app-1b.od
shlib-app-1b.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-app-1b.sd
shlib-app-1r.dd
shlib-app-1r.od
shlib-app-1r.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-app-1r.s
shlib-app-1r.sd
shlib-app-1rb.dd
shlib-app-1rb.od
shlib-app-1rb.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-app-1rb.sd
shlib-noindex.dd
shlib-noindex.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
shlib-noindex.sd
static-app-1.dd
static-app-1.od
static-app-1.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
static-app-1.sd
static-app-1b.dd
static-app-1b.od
static-app-1b.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
static-app-1b.sd
static-app-1r.dd
static-app-1r.od
static-app-1r.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
static-app-1r.sd
static-app-1rb.dd
static-app-1rb.od
static-app-1rb.rd ld: Adjust tic6x tests 2018-05-21 20:41:24 -07:00
static-app-1rb.sd
tic6x.exp
unwind-1.d
unwind-1.s
unwind-2.d
unwind-2.s
unwind-3.d
unwind-3.s
unwind-4.d
unwind-4.s
unwind-5.d
unwind-5.s
unwind-6.d
unwind.ld
weak-be.d
weak-data.d
weak.d
weak.s