binutils-gdb/ld/testsuite/ld-xtensa
Max Filippov 658ba81aef xtensa: bfd: fix TLS relocations generated for PIE
When generating TLS dynamic relocations the existing xtensa BFD code
treats linking to a PIE exactly as linking to a shared object, resulting
in generation of wrong relocations for TLS entries. Fix that and add
tests.

bfd/
	* elf32-xtensa.c (elf_xtensa_check_relocs): Use bfd_link_dll
	instead of bfd_link_pic. Add elf_xtensa_dynamic_symbol_p test
	when generating GOT entries.
	(elf_xtensa_relocate_section): Use bfd_link_dll instead of
	bfd_link_pic.
ld/
	* testsuite/ld-xtensa/tlspie.dd: New file.
	* testsuite/ld-xtensa/tlspie.rd: New file.
	* testsuite/ld-xtensa/tlspie.sd: New file.
	* testsuite/ld-xtensa/tlspie.td: New file.
	* testsuite/ld-xtensa/xtensa-linux.exp (TLS PIE transitions):
	New test.
2022-09-02 09:54:49 -07:00
..
call_overflow1.s
call_overflow2.s
call_overflow3.s
call_overflow.d
coalesce1.s
coalesce2.s
coalesce.d
coalesce.t
diff_overflow1.s
diff_overflow2.s
diff_overflow.d
lcall1.s
lcall2.s
lcall.d
lcall.t
relax-diff1.d
relax-diff1.s
relax-loc.d
relax-loc.s
relax-ndiff.d
relax-ndiff.s
relax-static-defs.s
relax-static-local-pie.d
relax-static-local-shared.d
relax-static-local.s
relax-static-pie.d
relax-static-shared.d
relax-static.s
relax-undef-weak-local-pie.d
relax-undef-weak-local-shared.d
relax-undef-weak-local.s
relax-undef-weak-pie-export-dynamic.d
relax-undef-weak-pie.d
relax-undef-weak-shared.d
relax-undef-weak.s
tlsbin.dd
tlsbin.rd
tlsbin.s
tlsbin.sd
tlsbin.td
tlslib.s
tlspic1.s
tlspic2.s
tlspic.dd
tlspic.rd
tlspic.sd
tlspic.td
tlspie.dd
tlspie.rd
tlspie.sd
tlspie.td
xtensa-linux.exp
xtensa.exp