binutils-gdb/ld/testsuite
Yury Norov c1fc2d7ee5 ld: aarch64: fix TLS relaxation where TCB_SIZE is used
TCB_SIZE is 2*sizeof(void *), which is 0x10 for lp64, and 0x8 for
ilp32. During relaxation, ld goes to do a replace:
bl   __tls_get_addr => add R0, R0, TCB_SIZE

But actual implementation is:
bfd_putl32 (0x91004000, contents + rel->r_offset + 4);

Which is equivalent of add x0, x0, 0x10. This is wrong for ilp32.

The possible fix for it is:
bfd_putl32 (0x91000000 | (TCB_SIZE<<10), contents + rel->r_offset + 4);

But ilp32 also needs w-registers, so it's simpler to put proper
instruction in #if/#else condition.

There are 2 such relaxations in elfNN_aarch64_tls_relax(), and so 2 new
tests added for ilp32 mode to test it.

Yury

	* bfd/elfnn-aarch64.c: fix TLS relaxations for ilp32 where
	TCB_SIZE is used.
	* ld/testsuite/ld-aarch64/aarch64-elf.exp: Add tests for the case.
	* ld/testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: New file.
	* ld/testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: New file.

Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
2016-12-14 12:00:59 +05:30
..
config ld: Add a linker configure option --enable-relro 2016-06-22 05:37:38 -07:00
ld-aarch64 ld: aarch64: fix TLS relaxation where TCB_SIZE is used 2016-12-14 12:00:59 +05:30
ld-alpha Place .shstrtab section after .symtab and .strtab, thus restoring monotonically increasing section offsets. 2016-08-19 09:16:30 +01:00
ld-arc [ARC] Fix parsing dtpoff relocation expression. 2016-09-14 14:04:34 +02:00
ld-arm Fix spelling in comments in Assembler files (ld) 2016-11-27 15:07:26 +10:30
ld-auto-import
ld-avr Fix PR20789 - relaxation with negative valued diff relocs 2016-11-16 16:11:46 +05:30
ld-bootstrap
ld-cdtest Correct cdtest g++ version test 2016-12-03 20:58:55 +10:30
ld-checks
ld-cris Enhance objdump so that it will use .got, .plt and .plt.got section symbols when disassembling, and it will use dynamic relocs to interpret entries in the PLT and GOT. 2016-10-11 13:50:10 +01:00
ld-crx
ld-cygwin
ld-d10v
ld-discard Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries. 2016-11-23 11:10:39 +00:00
ld-elf Don't add PHDR for objcopy/strip or ld script specifying PHDRS 2016-12-13 09:37:59 +10:30
ld-elfcomm Skip ELF STT_COMMON linker tests if shared libraries are not supported. 2016-05-03 10:44:35 +01:00
ld-elfvers PowerPC64 dot-sym testsuite fixes 2016-12-03 20:59:43 +10:30
ld-elfvsb Skip debug sections when estimating distances 2016-04-27 09:13:10 -07:00
ld-elfweak PowerPC64 dot-sym testsuite fixes 2016-12-03 20:59:43 +10:30
ld-fastcall
ld-frv Enhance objdump so that it will use .got, .plt and .plt.got section symbols when disassembling, and it will use dynamic relocs to interpret entries in the PLT and GOT. 2016-10-11 13:50:10 +01:00
ld-gc Restrict linker garbage collection personality test to cfi enabled targets. 2016-07-27 12:01:09 +01:00
ld-h8300
ld-i386 Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries. 2016-11-23 11:10:39 +00:00
ld-ia64 Place .shstrtab section after .symtab and .strtab, thus restoring monotonically increasing section offsets. 2016-08-19 09:16:30 +01:00
ld-ifunc PowerPC64 dot-sym testsuite fixes 2016-12-03 20:59:43 +10:30
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k Enhance objdump so that it will use .got, .plt and .plt.got section symbols when disassembling, and it will use dynamic relocs to interpret entries in the PLT and GOT. 2016-10-11 13:50:10 +01:00
ld-mep
ld-metag Enhance objdump so that it will use .got, .plt and .plt.got section symbols when disassembling, and it will use dynamic relocs to interpret entries in the PLT and GOT. 2016-10-11 13:50:10 +01:00
ld-mips-elf Place .shstrtab section after .symtab and .strtab, thus restoring monotonically increasing section offsets. 2016-08-19 09:16:30 +01:00
ld-misc
ld-mmix Always descend into output section statements in lang_do_assignments 2016-10-11 18:13:04 +10:30
ld-mn10300
ld-nds32
ld-nios2
ld-pe Fix more linker testsuite failures. 2016-06-28 15:55:22 +01:00
ld-pie Use variable args in run_ld_link_exec_tests 2016-07-21 11:34:45 +09:30
ld-plugin PowerPC64 dot-sym testsuite fixes 2016-12-03 20:59:43 +10:30
ld-powerpc PowerPC64 toc optimisation for power9 2016-12-06 18:25:14 +10:30
ld-s390 Fix spelling in comments in Assembler files (ld) 2016-11-27 15:07:26 +10:30
ld-scripts Don't fudge p_vaddr when PHDR in segment 2016-12-13 09:37:37 +10:30
ld-selective Fix some AVR test failures. 2016-05-04 13:03:52 +01:00
ld-sh Fix spelling in comments in Expect scripts (ld) 2016-11-27 15:08:43 +10:30
ld-shared
ld-size Use variable args in run_ld_link_exec_tests 2016-07-21 11:34:45 +09:30
ld-sparc bfd,ld: Continue after partially-successful relaxed call relocations in sparc. 2016-12-04 22:59:18 -08:00
ld-spu
ld-srec [ARC] XFAIL S-Records tests for both little and big endian ARC target. 2016-06-13 16:15:58 +02:00
ld-tic6x Update more tests for objdump change 2016-10-12 09:36:05 +10:30
ld-tilegx
ld-tilepro
ld-undefined Fix spelling in comments in Expect scripts (ld) 2016-11-27 15:08:43 +10:30
ld-unique LD/ELF: Unify STB_GNU_UNIQUE handling 2016-05-17 12:21:40 +01:00
ld-v850
ld-vax-elf Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries. 2016-11-23 11:10:39 +00:00
ld-versados
ld-visium
ld-vxworks
ld-x86-64 Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries. 2016-11-23 11:10:39 +00:00
ld-xc16x
ld-xstormy16
ld-xtensa Place .shstrtab section after .symtab and .strtab, thus restoring monotonically increasing section offsets. 2016-08-19 09:16:30 +01:00
ld-z8k ld/testsuite/ld-z8k/test-ld.sh: Remove. Checked in by mistake. 2016-06-04 22:39:46 +02:00
lib ld: Create test object files based on source file name 2016-11-04 12:04:11 +00:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303