binutils-gdb/config
Eric Botcazou c20c30f615 Fix PR ld/22263 on SPARC.
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.
2018-02-06 18:17:39 +01:00
..
acinclude.m4
acx.m4 Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
asmcfi.m4
ax_check_define.m4 Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
bitfields.m4 Sync config files with GCC 2015-07-14 09:18:16 -07:00
bootstrap-asan.mk sync binutils config/ with gcc 2016-12-08 21:35:11 +10:30
bootstrap-cet.mk Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
bootstrap-debug-big.mk
bootstrap-debug-ckovw.mk
bootstrap-debug-lean.mk Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
bootstrap-debug-lib.mk
bootstrap-debug.mk
bootstrap-lto-noplugin.mk Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
bootstrap-lto.mk Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
bootstrap-mpx.mk Sync config files with GCC 2015-07-14 09:18:16 -07:00
bootstrap-O1.mk
bootstrap-O3.mk
bootstrap-time.mk
bootstrap-ubsan.mk
cet.m4 Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
ChangeLog Fix PR ld/22263 on SPARC. 2018-02-06 18:17:39 +01:00
codeset.m4
depstand.m4
dfp.m4 Sync dfp.m4 with gcc 2015-06-30 10:20:19 -07:00
elf.m4 Sync elf.m4 with GCC tree 2015-03-16 08:49:06 -07:00
enable.m4
extensions.m4
futex.m4
gc++filt.m4
gcc-plugin.m4 Fix PR ld/22263 on SPARC. 2018-02-06 18:17:39 +01:00
gettext-sister.m4
gettext.m4 Sync config with GCC 2015-07-27 07:43:26 -07:00
glibc21.m4
gthr.m4
gxx-include-dir.m4
hwcaps.m4 Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
iconv.m4 Missing parts of fixes for in-tree libiconv 2015-08-24 10:57:03 +01:00
intdiv0.m4
inttypes_h.m4
inttypes-pri.m4
inttypes.m4
isl.m4 Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
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 Sync toplevel configure.ac with GCC 2015-07-14 07:49:50 -07:00
mh-cygwin
mh-darwin Sync libiberty from GCC, replaying updates to configure scripts 2015-06-24 21:43:02 +02:00
mh-djgpp
mh-mingw
mh-pa
mh-pa-hpux10
mh-ppc-aix
mmap.m4
mt-alphaieee
mt-android Update top level configure files by synchronizing them with gcc. 2018-01-10 15:29:21 +00:00
mt-d30v
mt-gnu Don't reset CXXFLAGS_FOR_TARGET 2015-03-16 08:41:42 -07:00
mt-mips16-compat
mt-mips-elfoabi
mt-mips-gnu
mt-nios2-elf
mt-ospace Append -g -Os rather than overwriting 2015-03-16 08:44:41 -07:00
mt-sde
mt-spu
multi.m4 sync binutils config/ with gcc 2016-12-08 21:35:11 +10:30
nls.m4
no-executables.m4
override.m4 Provide AC_PROG_LEX that copes with LEX=missing from top-level 2016-01-18 22:17:57 +10:30
picflag.m4 picflag.m4 high bit set in comment 2017-01-05 00:02:57 +10:30
plugins.m4
po.m4 Sync config with GCC 2015-07-27 07:43:26 -07:00
proginstall.m4
progtest.m4
sjlj.m4 Sync config files with GCC 2015-07-14 09:18:16 -07:00
stdint_h.m4
stdint.m4 Sync config with GCC 2015-07-27 07:43:26 -07:00
target-posix Sync config files with GCC 2015-07-14 09:18:16 -07:00
tcl.m4 Sync config with GCC 2015-07-27 07:43:26 -07:00
tls.m4
uintmax_t.m4
ulonglong.m4
unwind_ipinfo.m4
warnings.m4 Sync config/warnings.m4 with GCC 2015-07-14 08:39:12 -07:00
weakref.m4
zlib.m4 Set zlibdir/zlibinc with top_builddir/top_srcdir 2015-04-02 05:43:07 -07:00