binutils-gdb/ld/testsuite
Alan Modra a485e98ea0 Move ELF section headers to end of object file
Currently, section ordering differs a little for non-loaded reloc
sections output by ld -emit-relocs or ld -r and that after passing
such objects through objcopy.  Not that it really matters, but it
would be better for a simple objcopy to produce an unchanged output
object file.  Also, section headers are put somewhere in the middle of
the non-loaded sections, again slightly differently for ld and
objcopy.  This patch fixes these discrepancies and puts section
headers last, which is where gold puts them, and is where
bfd_from_remote_memory wrongly assumed they will be found.

bfd/
	* elf.c (assign_file_positions_except_relocs): Move section header
	placement to..
	(_bfd_elf_assign_file_positions_for_relocs): ..here.  Make static.
	* elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
	* elflink.c (bfd_elf_final_link): Don't call above function.
gas/testsuite/
	* gas/arm/got_prel.d: Adjust for changed section header placement.
	* gas/i386/ilp32/x86-64-size-1.d: Likewise.
	* gas/i386/ilp32/x86-64-size-3.d: Likewise.
	* gas/i386/ilp32/x86-64-size-5.d: Likewise.
	* gas/i386/ilp32/x86-64-unwind.d: Likewise.
	* gas/i386/size-1.d: Likewise.
	* gas/i386/size-3.d: Likewise.
	* gas/i386/x86-64-size-1.d: Likewise.
	* gas/i386/x86-64-size-3.d: Likewise.
	* gas/i386/x86-64-size-5.d: Likewise.
	* gas/i386/x86-64-unwind.d: Likewise.
	* gas/ia64/alias-ilp32.d: Likewise.
	* gas/ia64/alias.d: Likewise.
	* gas/ia64/group-1.d: Likewise.
	* gas/ia64/group-2.d: Likewise.
	* gas/ia64/secname-ilp32.d: Likewise.
	* gas/ia64/secname.d: Likewise.
	* gas/ia64/unwind-ilp32.d: Likewise.
	* gas/ia64/unwind.d: Likewise.
	* gas/mmix/bspec-1.d: Likewise.
	* gas/mmix/bspec-2.d: Likewise.
	* gas/mmix/byte-1.d: Likewise.
	* gas/mmix/loc-1.d: Likewise.
	* gas/mmix/loc-2.d: Likewise.
	* gas/mmix/loc-3.d: Likewise.
	* gas/mmix/loc-4.d: Likewise.
	* gas/mmix/loc-5.d: Likewise.
	* gas/tic6x/scomm-directive-4.d: Likewise.
ld/testsuite/
	* ld-aarch64/emit-relocs-local-addend.d: Adjust for changed
	section header placement.
	* ld-aarch64/local-addend-r.d: Likewise.
	* ld-mmix/bspec1.d: Likewise.
	* ld-mmix/bspec2.d: Likewise.
	* ld-mmix/local1.d: Likewise.
	* ld-mmix/local3.d: Likewise.
	* ld-mmix/local5.d: Likewise.
	* ld-mmix/local7.d: Likewise.
	* ld-mmix/undef-3.d: Likewise.
	* ld-sh/sh64/crange3-cmpct.rd: Likewise.
	* ld-sh/sh64/crange3-media.rd: Likewise.
	* ld-sh/sh64/crangerel1.rd: Likewise.
	* ld-sh/sh64/crangerel2.rd: Likewise.
	* ld-tic6x/common.d: Likewise.
	* ld-tic6x/shlib-1.rd: Likewise.
	* ld-tic6x/shlib-1b.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
	* ld-x86-64/ilp32-4.d: Likewise.
	* ld-x86-64/split-by-file-nacl.rd: Likewise.
	* ld-x86-64/split-by-file.rd: Likewise.
2014-09-11 00:15:51 +09:30
..
config Ensure ld testsuite gcc -B options precede $CC -B options 2014-07-07 13:37:16 +09:30
ld-aarch64 Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ld-alpha Update copyright years 2014-03-05 22:16:15 +10:30
ld-arm bfd/ChangeLog 2014-08-21 18:00:35 +08:00
ld-auto-import Update copyright years 2014-03-05 22:16:15 +10:30
ld-avr bfd/ChangeLog 2014-04-10 19:50:33 +04:00
ld-bootstrap Don't link FreeBSD tests with -ldl. 2014-05-19 08:49:55 +02:00
ld-cdtest Update copyright years 2014-03-05 22:16:15 +10:30
ld-checks Update copyright years 2014-03-05 22:16:15 +10:30
ld-cris Update copyright years 2014-03-05 22:16:15 +10:30
ld-crx Update copyright years 2014-03-05 22:16:15 +10:30
ld-cygwin Update copyright years 2014-03-05 22:16:15 +10:30
ld-d10v Update copyright years 2014-03-05 22:16:15 +10:30
ld-discard Remove support for the (deprecated) openrisc and or32 configurations and replace 2014-04-22 15:57:47 +01:00
ld-elf Fix linker testsuite failures for Aarch64. 2014-08-26 15:06:49 +01:00
ld-elfcomm Update copyright years 2014-03-05 22:16:15 +10:30
ld-elfvers ld/testsuite: Disable non-PIC shared library tests on ARM 2014-07-10 09:32:42 +01:00
ld-elfvsb Update copyright years 2014-03-05 22:16:15 +10:30
ld-elfweak Update copyright years 2014-03-05 22:16:15 +10:30
ld-fastcall Update copyright years 2014-03-05 22:16:15 +10:30
ld-frv Update copyright years 2014-03-05 22:16:15 +10:30
ld-gc Update copyright years 2014-03-05 22:16:15 +10:30
ld-h8300 Update copyright years 2014-03-05 22:16:15 +10:30
ld-i386 Use bfd_is_abs_section to check discarded input section 2014-08-27 07:59:48 -07:00
ld-ia64 Update copyright years 2014-03-05 22:16:15 +10:30
ld-ifunc Properly match PLT entry against .got.plt relocation 2014-07-16 10:57:49 -07:00
ld-libs Update copyright years 2014-03-05 22:16:15 +10:30
ld-linkonce Update copyright years 2014-03-05 22:16:15 +10:30
ld-m68hc11 Update copyright years 2014-03-05 22:16:15 +10:30
ld-m68k Update copyright years 2014-03-05 22:16:15 +10:30
ld-mep Update copyright years 2014-03-05 22:16:15 +10:30
ld-metag Update copyright years 2014-03-05 22:16:15 +10:30
ld-mips-elf MIPS testsuite cleanup - part 4 2014-09-06 18:02:50 +01:00
ld-misc Update copyright years 2014-03-05 22:16:15 +10:30
ld-mmix Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ld-mn10300 Update copyright years 2014-03-05 22:16:15 +10:30
ld-nds32 Update copyright years 2014-03-05 22:16:15 +10:30
ld-nios2 Nios II CALL26 linker relaxation 2014-01-30 17:47:07 -08:00
ld-pe Add support for generating and inserting build IDs into COFF binaries. 2014-04-08 10:59:43 +01:00
ld-pie Update copyright years 2014-03-05 22:16:15 +10:30
ld-plugin LTO plugin with older gcc 2014-08-18 21:01:26 +09:30
ld-powerpc Power/GAS: Don't set VLE annotation for non-VLE processors/instructions 2014-08-22 16:52:20 +01:00
ld-s390 Update copyright years 2014-03-05 22:16:15 +10:30
ld-scripts [MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions 2014-07-29 11:27:59 +01:00
ld-selective Update copyright years 2014-03-05 22:16:15 +10:30
ld-sh Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ld-shared ld/aarch64: xfail non-PIC shared object tests on aarch64 2014-05-20 09:47:29 +01:00
ld-size Update copyright years 2014-03-05 22:16:15 +10:30
ld-sparc Update copyright years 2014-03-05 22:16:15 +10:30
ld-spu Update copyright years 2014-03-05 22:16:15 +10:30
ld-srec Update copyright years 2014-03-05 22:16:15 +10:30
ld-tic6x Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ld-tilegx Update copyright years 2014-03-05 22:16:15 +10:30
ld-tilepro Update copyright years 2014-03-05 22:16:15 +10:30
ld-undefined Update copyright years 2014-03-05 22:16:15 +10:30
ld-unique Update copyright years 2014-03-05 22:16:15 +10:30
ld-v850 Update copyright years 2014-03-05 22:16:15 +10:30
ld-vax-elf Update copyright years 2014-03-05 22:16:15 +10:30
ld-versados Update copyright years 2014-03-05 22:16:15 +10:30
ld-vxworks Update copyright years 2014-03-05 22:16:15 +10:30
ld-x86-64 Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ld-xc16x Update copyright years 2014-03-05 22:16:15 +10:30
ld-xstormy16 Update copyright years 2014-03-05 22:16:15 +10:30
ld-xtensa Use signed data type for R_XTENSA_DIFF* relocation offsets. 2014-05-08 01:55:41 +04:00
lib Fix testsuite ld_simple_link_defsyms for windows targets 2014-08-29 10:34:18 +09:30
ChangeLog Move ELF section headers to end of object file 2014-09-11 00:15:51 +09:30
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-9303