binutils-gdb/ld/testsuite
H.J. Lu f638657759 x86: Disallow invalid relocations against protected symbols
Since glibc 2.36 will issue warnings for copy relocation against
protected symbols and non-canonical reference to canonical protected
functions, change the linker to always disallow such relocations.

bfd/

	* elf32-i386.c (elf_i386_scan_relocs): Remove check for
	elf_has_indirect_extern_access.
	* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.
	(elf_x86_64_relocate_section): Remove check for
	elf_has_no_copy_on_protected.
	* elfxx-x86.c (elf_x86_allocate_dynrelocs): Check for building
	executable instead of elf_has_no_copy_on_protected.
	(_bfd_x86_elf_adjust_dynamic_symbol): Disallow copy relocation
	against non-copyable protected symbol.
	* elfxx-x86.h (SYMBOL_NO_COPYRELOC): Remove check for
	elf_has_no_copy_on_protected.

ld/

	* testsuite/ld-i386/i386.exp: Expect linker error for PR ld/17709
	test.
	* testsuite/ld-i386/pr17709.rd: Removed.
	* testsuite/ld-i386/pr17709.err: New file.
	* testsuite/ld-x86-64/pr17709.rd: Removed.
	* testsuite/ld-x86-64/pr17709.err: New file.
	* testsuite/ld-x86-64/pr28875-func.err: Updated.
	* testsuite/ld-x86-64/x86-64.exp: Expect linker error for PR
	ld/17709 test.  Add tests for function pointer against protected
	function.
2022-07-19 08:41:52 -07:00
..
config
ld-aarch64 aarch64: Allow PC-relative relocations against protected STT_FUNC for -shared 2022-06-23 01:10:44 -07:00
ld-alpha
ld-arc
ld-arm arm: Define elf_backend_extern_protected_data to 0 [PR 18705] 2022-06-25 10:27:49 -07:00
ld-auto-import
ld-avr
ld-bootstrap ld: add --package-metadata 2022-05-26 12:56:12 +09:30
ld-bpf
ld-cdtest
ld-checks
ld-cris Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-crx
ld-csky Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-ctf libctf: impose an ordering on conflicting types 2022-04-28 11:47:12 +01:00
ld-cygwin
ld-d10v
ld-discard
ld-dynamic
ld-elf ld: Pass -nostdlib to compiler with -r 2022-07-18 18:54:20 -07:00
ld-elfcomm
ld-elfvers
ld-elfweak
ld-fastcall
ld-frv Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-gc Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-h8300
ld-i386 x86: Disallow invalid relocations against protected symbols 2022-07-19 08:41:52 -07:00
ld-ia64
ld-ifunc x86: Properly handle IFUNC function pointer reference 2022-05-31 16:28:06 -07:00
ld-libs
ld-linkonce
ld-loongarch-elf
ld-m68hc11
ld-m68k
ld-mep
ld-metag Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-mips-elf BFD_RELOC_MIPS_16 2022-06-14 10:03:55 +09:30
ld-misc
ld-mmix
ld-mn10300 Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-msp430-elf
ld-nds32
ld-nios2 Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-or1k
ld-pdp11
ld-pe
ld-pie
ld-plugin LTO: Handle __real_SYM reference in IR 2022-05-04 16:26:51 -07:00
ld-powerpc PowerPC64: align plt_branch stubs 2022-06-28 13:02:26 +09:30
ld-pru Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-riscv-elf
ld-s12z
ld-s390
ld-scripts ld testsuite xcoff XPASS 2022-04-21 15:30:50 +09:30
ld-selective
ld-sh
ld-shared
ld-size Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-sparc
ld-spu
ld-srec
ld-tic6x Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-tilegx
ld-tilepro
ld-undefined
ld-unique Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-v850
ld-vax-elf
ld-visium
ld-vsb
ld-vxworks
ld-x86-64 x86: Disallow invalid relocations against protected symbols 2022-07-19 08:41:52 -07:00
ld-xstormy16
ld-xtensa
ld-z8k
ld-z80
lib
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