binutils-gdb/ld/testsuite
H.J. Lu 320fdefef1 ld: Add a before_plugin_all_symbols_read hook
Add a before_plugin_all_symbols_read hook to load symbol references from
DT_NEEDED entries, included from --copy-dt-needed-entries, before reading
plugin symbols to properly resolve plugin symbol references.

bfd/

	PR ld/28849
	* elf-bfd.h (elf_link_hash_table): Add handling_dt_needed.
	* elflink.c (_bfd_elf_merge_symbol): Don't set non_ir_ref_dynamic
	before plugin 'all symbols read' hook is called.

ld/

	PR ld/28849
	* ldelf.c (ldelf_handle_dt_needed): New function.
	(ldelf_before_plugin_all_symbols_read): Likewise.
	(ldelf_after_open): Call ldelf_handle_dt_needed.
	* ldelf.h (ldelf_before_plugin_all_symbols_read): New.
	* ldemul.c (ldemul_before_plugin_all_symbols_read): Likewise.
	* ldemul.h (ldemul_before_plugin_all_symbols_read): Likewise.
	(ld_emulation_xfer_struct): Add before_plugin_all_symbols_read.
	* ldlang.c (lang_process): Call
	ldemul_before_plugin_all_symbols_read before calling
	plugin_call_all_symbols_read.
	* emultempl/elf.em
	(gld${EMULATION_NAME}_before_plugin_all_symbols_read): New.
	(LDEMUL_BEFORE_PLUGIN_ALL_SYMBOLS_READ): New.
	* emultempl/emulation.em (ld_${EMULATION_NAME}_emulation):
	Initialize the before_plugin_all_symbols_read field.
	* testsuite/ld-plugin/lto.exp: Run PR ld/28849 tests.
	* testsuite/ld-plugin/pr28849.d: New file.
	* testsuite/ld-plugin/pr28849a.c: Likewise.
	* testsuite/ld-plugin/pr28849b.c: Likewise.
2022-03-09 18:23:43 -08:00
..
config Enable "size" as a dumpprog in ld 2022-02-05 17:37:19 +10:30
ld-aarch64 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-alpha Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-arc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-arm Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-auto-import Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-avr Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-bootstrap Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-bpf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-cdtest Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-checks Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-cris Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-crx Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-csky
ld-ctf Adjust ld ctf test for 32-bit targets 2022-03-04 00:28:07 +10:30
ld-cygwin Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-d10v Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-discard Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-dynamic Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elf Fix linker tests to compile with gcc-12. 2022-03-01 10:10:20 +00:00
ld-elfcomm Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elfvers Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elfweak Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-fastcall Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-frv Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-gc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-h8300 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-i386 i386: Update I386_NEED_DYNAMIC_RELOC_TYPE_P for DT_TEXTREL 2022-02-15 15:08:17 -08:00
ld-ia64 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-ifunc elf: Support DT_RELR in linker tests 2022-01-12 06:04:51 -08:00
ld-libs Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-linkonce Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-loongarch-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-m68hc11 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-m68k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mep Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-metag Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mips-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-misc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mmix Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mn10300 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-msp430-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-nds32 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-nios2
ld-or1k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-pdp11 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-pe gas: add visibility support for XCOFF 2022-01-12 09:08:11 +01:00
ld-pie Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-plugin ld: Add a before_plugin_all_symbols_read hook 2022-03-09 18:23:43 -08:00
ld-powerpc A more elegant pr28827-1 testcase 2022-02-07 09:36:19 +10:30
ld-pru elf: Set p_align to the minimum page size if possible 2022-01-05 05:06:18 -08:00
ld-riscv-elf RISC-V: Stop reporting warnings for mismatched extension versions 2022-02-08 08:23:28 -08:00
ld-s12z Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-s390 Revert "elf: Remove the 1-page gap before the RELRO segment" 2022-02-07 13:42:41 +10:30
ld-scripts ld: Support customized output section type 2022-02-16 17:41:23 +00:00
ld-selective Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-sh Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-shared Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-size Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-sparc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-spu Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-srec Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-tic6x Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-tilegx Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-undefined Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-unique Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-v850 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-visium Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-vsb ld: add hidden and internal visibility support for XCOFF 2022-01-12 09:08:25 +01:00
ld-vxworks Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-x86-64 x86-64: Use MAXPAGESIZE for the relro segment alignment 2022-02-14 17:39:34 -08:00
ld-xc16x Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-xstormy16 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-xtensa Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-z8k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-z80 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
lib Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10: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