binutils-gdb/ld/testsuite
Alan Modra d349c8e245 Power10 stub selection
This patch better supports mixing of power10 and non-power10 code,
as might be seen in a cpu-optimized library using ifuncs to select
functions optimized for a given cpu.  Using -Wl,--no-power10-stubs
isn't that good in this situation since non-power10 notoc stubs are
slower and larger than the power10 variants, which you'd like to use
on power10 code paths.

With this change, power10 pc-relative code that makes calls marked
@notoc uses power10 stubs if stubs are necessary, and other calls use
non-power10 instructions in stubs.  This will mean that if gcc is
generating code for -mcpu=power10 but with pc-rel disabled then you'll
get the older stubs even on power10 (unless you force with
-Wl,--power10-stubs).  That shouldn't be too big a problem: stubs that
use r2 are reasonable.  It's just the ones that set up addressing
using "mflr 12; bcl 20,31,.+4; mflr 11; mtlr 12" that should be
avoided if possible.

bfd/
	* elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs.
	(select_alt_stub): New function.
	(ppc_get_stub_entry): Use it here.
	(ppc64_elf_check_relocs): Set had_power10_relocs rather than
	power10_stubs.
	(ppc64_elf_size_stubs): Clear power10_stubs here instead.  Don't
	merge notoc stubs with other varieties when power10_stubs is "auto".
	Instead dup the stub hash table entry.
	(plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust
	tests of power10_stubs.
ld/
	* emultempl/ppc64elf.em (power10-stubs): Accept optional "auto" arg.
	* ld.texi (power10-stubs): Update.
	* testsuite/ld-powerpc/callstub-1.d: Force --power10-stubs.
	* testsuite/ld-powerpc/callstub-2.d: Relax branch offset comparison.
	* testsuite/ld-powerpc/callstub-4.d: New test.
	* testsuite/ld-powerpc/notoc.d: Force --no-power10-stubs.
	* testsuite/ld-powerpc/notoc3.d,
	* testsuite/ld-powerpc/notoc3.s,
	* testsuite/ld-powerpc/notoc3.wf: New test.
	* testsuite/ld-powerpc/powerpc.exp: Run new tests.  Pass
	--no-power10-stubs for notoc link.

(cherry picked from commit e10a07b32dc1faed25b5bbcbbc47d68e2ff537b9)
2020-07-19 12:31:15 +09:30
..
config Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
ld-aarch64 [PATCH v3] aarch64: Emit jump slot for conditional branch to undefined symbols 2020-05-19 11:07:52 +01:00
ld-alpha ecoff testsuite fixes 2020-06-20 10:59:11 +09:30
ld-arc [ARC][committed] Update test matching pattern. 2020-01-13 11:16:47 +02:00
ld-arm Re: Change readelf's display of symbol names 2020-07-03 17:15:16 +09:30
ld-auto-import Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-avr Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-bootstrap tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-bpf Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-cdtest Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-checks Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-cris cris: Don't generate unnecessary dynamic tags 2020-06-24 04:00:31 -07:00
ld-crx Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-csky csky: Don't generate unnecessary dynamic tags 2020-06-24 06:14:28 -07:00
ld-cygwin Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-d10v Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-discard Unnecessary load_lib in ld testsuite 2020-06-15 15:07:13 +09:30
ld-dynamic ld-dynamic test fixes 2020-06-04 14:13:04 +09:30
ld-elf Remove x86 NaCl target support 2020-06-30 08:56:14 -07:00
ld-elfcomm tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-elfvers Remove x86 NaCl target support 2020-06-30 08:56:14 -07:00
ld-elfvsb Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-elfweak Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-fastcall Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-frv tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-gc powerpc garbage collect test 2020-07-13 23:41:57 +09:30
ld-h8300 h8300-linux ld testsuite 2020-03-25 14:51:41 +10:30
ld-i386 Re: Change readelf's display of symbol names 2020-07-03 17:15:16 +09:30
ld-ia64 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-ifunc pr18841 tests on powerpc64 2020-07-13 23:41:01 +09:30
ld-libs Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-linkonce PR26103 testcase 2020-06-15 12:11:27 +09:30
ld-m68hc11 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-m68k m68k: tag floating-point ABI used 2020-06-26 14:42:19 +09:30
ld-mep Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-metag Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-mips-elf Change readelf's display of symbol names (when not in --wide mode) so that if they are going to be truncated then "[...]" is displayed at the end. Add a comment line option to disable this enhancement and restore the old behaviour. 2020-07-02 11:30:52 +01:00
ld-misc Fix linker tests to work with 16-bit targets. 2020-04-21 15:10:52 +01:00
ld-mmix mmix bfd: fix bfd_assert for R_MMIX_PUSHJ_STUBBABLE against undef'd symbol 2020-07-15 20:16:27 +02:00
ld-mn10300 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-msp430-elf MSP430: Add input section rules for .upper sections to default linker script 2020-01-16 13:22:31 +00:00
ld-nds32 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-nios2 Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-or1k Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-pdp11 Fixes for the magic number used in PDP11 AOUT binaries. 2020-04-14 14:41:27 +01:00
ld-pe Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-pie Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-plugin Remove x86 NaCl target support 2020-06-30 08:56:14 -07:00
ld-powerpc Power10 stub selection 2020-07-19 12:31:15 +09:30
ld-pru Fix binary compatibility between GCC and the TI compiler for the PRU target. 2018-05-09 11:39:32 +01:00
ld-riscv-elf RISC-V: Report warning when linking the objects with different priv specs. 2020-06-22 10:01:14 +08:00
ld-s12z Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-s390 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-scripts Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-selective Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ld-sh Re: Change readelf's display of symbol names 2020-07-03 17:15:16 +09:30
ld-shared ld: Pass -z notext to linker for tests with DT_TEXTREL 2020-05-25 04:54:50 -07:00
ld-size Use __asm__ rather than asm in ld testsuite 2020-06-16 22:13:20 +09:30
ld-sparc Re: Change readelf's display of symbol names 2020-07-03 17:15:16 +09:30
ld-spu Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-srec tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-tic6x tic6x: Call _bfd_elf_add_dynamic_tags 2020-06-29 05:53:01 -07:00
ld-tilegx Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-undefined Add generic tests for linker support of the -shared or -pie options to tests which use them. 2020-04-30 13:49:30 +01:00
ld-unique ld testsuite fails with default-PIE compiler 2020-06-04 10:20:48 +09:30
ld-v850 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-visium Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-vxworks Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-x86-64 Remove x86 NaCl target support 2020-06-30 08:56:14 -07:00
ld-xc16x Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-xtensa xtensa: fix XTENSA_NDIFF handling for PR ld/25861 2020-04-29 18:34:23 -07:00
ld-z8k Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ld-z80 Various fixes for the Z80 support. 2020-02-19 17:46:10 +00:00
lib Remove perror from ld_assemble, ld_compile and ld_nm 2020-06-20 15:53:37 +09:30
ChangeLog-2004 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2005 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2006 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2007 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2008 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2009 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2010 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2011 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2012 Rotate binutils ChangeLog for 2013 2013-01-02 17:06:32 +00:00
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-2015 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00