c20c30f615
This is -fpie -pie generating dynamic relocations in the text section, simply because no TLS transitions are applied in PIE mode. The meat of the patch is to turn calls to bfd_link_pic (info) in TLS-related code into !bfd_link_executable (info) and there are quite a lot of them... bfd/ * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic into call to !bfd_link_executable and tidy up. (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up. <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_TLS_IE_HI22>: Likewise. <GOT relocations>: Remove useless code, tidy and merge blocks. <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_WPLT30>: Tidy up. (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to !bfd_link_executable. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up. <R_SPARC_TLS_GD_HI22>: Merge into... <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_TLS_LDO_HIX22>: Likewise. <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up. <R_SPARC_TLS_LDM_CALL>: Likewise. <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up. <R_SPARC_TLS_GD_ADD>: Likewise. <R_SPARC_TLS_LDM_ADD>: Likewise. <R_SPARC_TLS_LDO_ADD>: Likewise. <R_SPARC_TLS_IE_LD>: Likewise. ld/ * testsuite/ld-elf/tls.exp (AFLAGS_PIC): Define on SPARC. (pr22263-1): Pass AFLAGS_PIC to the assembler. * testsuite/ld-sparc/tlspie32.s: Add test for other 3 transitions. * testsuite/ld-sparc/tlspie32.dd: Adjust to above. * testsuite/ld-sparc/tlspie64.s: Add test for other 3 transitions. * testsuite/ld-sparc/tlspie64.dd: Adjust to above. |
||
---|---|---|
.. | ||
acinclude.m4 | ||
acx.m4 | ||
asmcfi.m4 | ||
ax_check_define.m4 | ||
bitfields.m4 | ||
bootstrap-asan.mk | ||
bootstrap-cet.mk | ||
bootstrap-debug-big.mk | ||
bootstrap-debug-ckovw.mk | ||
bootstrap-debug-lean.mk | ||
bootstrap-debug-lib.mk | ||
bootstrap-debug.mk | ||
bootstrap-lto-noplugin.mk | ||
bootstrap-lto.mk | ||
bootstrap-mpx.mk | ||
bootstrap-O1.mk | ||
bootstrap-O3.mk | ||
bootstrap-time.mk | ||
bootstrap-ubsan.mk | ||
cet.m4 | ||
ChangeLog | ||
codeset.m4 | ||
depstand.m4 | ||
dfp.m4 | ||
elf.m4 | ||
enable.m4 | ||
extensions.m4 | ||
futex.m4 | ||
gc++filt.m4 | ||
gcc-plugin.m4 | ||
gettext-sister.m4 | ||
gettext.m4 | ||
glibc21.m4 | ||
gthr.m4 | ||
gxx-include-dir.m4 | ||
hwcaps.m4 | ||
iconv.m4 | ||
intdiv0.m4 | ||
inttypes_h.m4 | ||
inttypes-pri.m4 | ||
inttypes.m4 | ||
isl.m4 | ||
largefile.m4 | ||
lcmessage.m4 | ||
ld-symbolic.m4 | ||
lead-dot.m4 | ||
lib-ld.m4 | ||
lib-link.m4 | ||
lib-prefix.m4 | ||
libstdc++-raw-cxx.m4 | ||
lthostflags.m4 | ||
math.m4 | ||
mh-alpha-linux | ||
mh-cygwin | ||
mh-darwin | ||
mh-djgpp | ||
mh-mingw | ||
mh-pa | ||
mh-pa-hpux10 | ||
mh-ppc-aix | ||
mmap.m4 | ||
mt-alphaieee | ||
mt-android | ||
mt-d30v | ||
mt-gnu | ||
mt-mips16-compat | ||
mt-mips-elfoabi | ||
mt-mips-gnu | ||
mt-nios2-elf | ||
mt-ospace | ||
mt-sde | ||
mt-spu | ||
multi.m4 | ||
nls.m4 | ||
no-executables.m4 | ||
override.m4 | ||
picflag.m4 | ||
plugins.m4 | ||
po.m4 | ||
proginstall.m4 | ||
progtest.m4 | ||
sjlj.m4 | ||
stdint_h.m4 | ||
stdint.m4 | ||
target-posix | ||
tcl.m4 | ||
tls.m4 | ||
uintmax_t.m4 | ||
ulonglong.m4 | ||
unwind_ipinfo.m4 | ||
warnings.m4 | ||
weakref.m4 | ||
zlib.m4 |