binutils-gdb/ld/testsuite
H.J. Lu cebd6b8ac1 IFUNC: Update IFUNC resolver check with DT_TEXTREL
Add ifunc_resolvers to elf_link_hash_table and use it for both x86 and
ppc64.  Before glibc commit b5c45e837, DT_TEXTREL is incompatible with
IFUNC resolvers.  Set ifunc_resolvers if there are IFUNC resolvers and
issue a warning for IFUNC resolvers with DT_TEXTREL.

bfd/

	PR ld/18801
	* elf-bfd.h (elf_link_hash_table): Add ifunc_resolvers.
	(_bfd_elf_allocate_ifunc_dyn_relocs): Remove the
	bfd_boolean * argument.  Set ifunc_resolvers if there are IFUNC
	resolvers.
	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
	Set ifunc_resolvers if there are FUNC resolvers.
	* elf64-ppc.c (ppc_link_hash_table): Remove local_ifunc_resolver.
	(build_global_entry_stubs_and_plt): Replace local_ifunc_resolver
	with elf.ifunc_resolvers.
	(write_plt_relocs_for_local_syms): Likewise.
	(ppc64_elf_relocate_section): Likewise.
	(ppc64_elf_finish_dynamic_sections): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
	Updated.
	* elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
	(_bfd_x86_elf_size_dynamic_sections): Check elf.ifunc_resolvers
	instead of readonly_dynrelocs_against_ifunc.
	* elfxx-x86.h (elf_x86_link_hash_table): Remove
	readonly_dynrelocs_against_ifunc.

ld/

	PR ld/18801
	* testsuite/ld-i386/i386.exp: Run ifunc-textrel-1a,
	ifunc-textrel-1b, ifunc-textrel-2a and ifunc-textrel-2b.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/ifunc-textrel-1a.d: Likewise.
	* testsuite/ld-i386/ifunc-textrel-1b.d: Likewise.
	* testsuite/ld-i386/ifunc-textrel-2a.d: Likewise.
	* testsuite/ld-i386/ifunc-textrel-2b.d: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-1.s: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-1a.d: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-1b.d: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-2.s: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-2a.d: Likewise.
	* testsuite/ld-x86-64/ifunc-textrel-2b.d: Likewise.
	* testsuite/ld-i386/pr18801a.d: Expect warning for IFUNC
	resolvers.
	* testsuite/ld-i386/pr18801b.d: Likewise.
	* estsuite/ld-x86-64/pr18801a.d: Likewise.
	* estsuite/ld-x86-64/pr18801b.d: Likewise.
2020-06-09 06:57:25 -07:00
..
config tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-aarch64
ld-alpha
ld-arc
ld-arm
ld-auto-import
ld-avr
ld-bootstrap tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-bpf
ld-cdtest
ld-checks
ld-cris
ld-crx
ld-csky
ld-cygwin
ld-d10v
ld-discard
ld-dynamic ld-dynamic test fixes 2020-06-04 14:13:04 +09:30
ld-elf PR26065, ld/testsuite/ld-elf symbolic tests dl4e and dl4f fail 2020-06-09 17:34:52 +09:30
ld-elfcomm tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-elfvers
ld-elfvsb
ld-elfweak tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-fastcall
ld-frv tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-gc tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-h8300
ld-i386 IFUNC: Update IFUNC resolver check with DT_TEXTREL 2020-06-09 06:57:25 -07:00
ld-ia64
ld-ifunc tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-libs
ld-linkonce
ld-m68hc11
ld-m68k
ld-mep
ld-metag
ld-mips-elf tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-misc
ld-mmix
ld-mn10300
ld-msp430-elf
ld-nds32
ld-nios2 tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-or1k
ld-pdp11
ld-pe
ld-pie
ld-plugin tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-powerpc tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-pru
ld-riscv-elf RISC-V: The object without priv spec attributes can be linked with any object. 2020-06-05 12:20:53 +08:00
ld-s12z
ld-s390
ld-scripts tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-selective tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-sh tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-shared
ld-size tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-sparc
ld-spu
ld-srec tcl global directive outside proc body does nothing (ld) 2020-06-04 16:11:19 +09:30
ld-tic6x
ld-tilegx
ld-tilepro
ld-undefined
ld-unique ld testsuite fails with default-PIE compiler 2020-06-04 10:20:48 +09:30
ld-v850
ld-vax-elf
ld-visium
ld-vxworks
ld-x86-64 IFUNC: Update IFUNC resolver check with DT_TEXTREL 2020-06-09 06:57:25 -07:00
ld-xc16x
ld-xstormy16
ld-xtensa
ld-z8k
ld-z80
lib ld -plugin options when plugins are disabled 2020-06-06 11:28:08 +09:30
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