binutils-gdb/ld/testsuite
Eric Botcazou f8745e1cd1 PR ld/22972 on SPARC.
This is a regression for the corner case of a hidden symbol in a PIC/PIE
binary which is subject to both a new-style GOTDATA relocation and an
old-style GOT relocation.  In this case, depending  on the link order,
the R_SPARC_RELATIVE dynamic relocation for the GOT slot needed because
of the old-style relocation can be replaced with R_SPARC_NONE coming
from the GOTDATA relocation.

The fix simply records whether an old-style GOT relocation is seen for a
symbol and prevents the R_SPARC_NONE from being generated in this case.

bfd/
	* elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
	has_old_style_got_reloc.
	(_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
	relocations.  Fix a couple of long lines.
	(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
	a R_SPARC_NONE for the GOT slot if the symbol is also subject to
	old-style GOT relocations.
ld/
	* testsuite/ld-sparc/sparc.exp: Add test for mixed GOTDATA/GOT relocs.
	* testsuite/ld-sparc/gotop-hidden.c: New file.
	* testsuite/ld-sparc/got-hidden32.s: Likewise.
	* testsuite/ld-sparc/got-hidden64.s: Likewise.
	* testsuite/ld-sparc/pass.out: Likewise.
2018-03-28 12:17:15 +02:00
..
config ld: Skip unsupported static executable tests 2018-01-29 04:55:23 -08:00
ld-aarch64 [PR20402][LD][AARCH64]Don't emit RELATIVE relocation for absolute symbols which are resolved at static linking time. 2018-03-07 14:47:27 +00:00
ld-alpha Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-arc ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-arm ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-auto-import Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-avr Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-bootstrap ld: Skip unsupported static executable tests 2018-01-29 04:55:23 -08:00
ld-cdtest Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-checks Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-cris ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-crx Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-cygwin Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-d10v Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-discard Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-elf ld/testsuite: XFAIL pr20995-2 on aarch64*-*-elf* 2018-03-20 13:31:05 -07:00
ld-elfcomm ELF linker messages 2018-02-26 09:29:15 +10:30
ld-elfvers Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-elfvsb Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-elfweak Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-fastcall Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-frv Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-gc gc.exp: Remove extraneous LD flags from the personality test 2018-03-20 11:48:59 +00:00
ld-h8300 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-i386 x86: Treat relocation against IFUNC symbol as FUNC 2018-03-08 06:36:52 -08:00
ld-ia64 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-ifunc Fix Sparc, s390 and AArch64 targets so that they can handle relocs against ifunc symbols found in note sections. 2018-03-09 14:37:36 +00:00
ld-libs Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-linkonce Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-m68hc11 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-m68k Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-mep Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-metag Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-mips-elf PR ld/21900: MIPS: Fix relocation processing with undefined symbols 2018-03-03 15:49:21 +00:00
ld-misc Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-mmix ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-mn10300 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-msp430-elf Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-nds32 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-nios2
ld-pe Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-pie Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-plugin Adjust testsuite/ld-plugin/pr22983.d 2018-03-20 09:21:35 -07:00
ld-powerpc ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-pru
ld-riscv-elf RISC-V: Give error for ignored pcrel_lo addend. 2018-02-15 10:53:46 -08:00
ld-s390 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-scripts ld: Fix issue where PROVIDE overrides defined symbol 2018-01-11 17:35:35 +00:00
ld-selective Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-sh ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-shared Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-size Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-sparc PR ld/22972 on SPARC. 2018-03-28 12:17:15 +02:00
ld-spu Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-srec RISC-V: Disallow output format changes. 2018-03-06 12:01:50 -08:00
ld-tic6x ELF linker messages 2018-02-26 09:29:15 +10:30
ld-tilegx Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-undefined ld error/warning messages 2018-02-26 10:51:12 +10:30
ld-unique RISC-V: Disallow output format changes. 2018-03-06 12:01:50 -08:00
ld-v850 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-versados Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-visium Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-vxworks Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-x86-64 x86-64: Add ENDBR64 to the TLSDESC PLT entry 2018-03-25 05:02:32 -07:00
ld-xc16x Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-xtensa Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
ld-z8k Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
lib ld: Skip unsupported static executable tests 2018-01-29 04:55:23 -08: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