binutils-gdb/ld/testsuite
Alan Modra 1657026ccd PowerPC64 DT_RELR
PowerPC64 takes a more traditional approach to DT_RELR than x86.  Count
relative relocs in check_relocs, allocate space for them and output in
the usual places but not doing so when enable_dt_relr.  DT_RELR is
sized in the existing ppc stub relaxation machinery, run via the
linker's ldemul_after_allocation hook.  DT_RELR is output in the same
function that writes ppc stubs, run via ldemul_finish.

This support should be considered experimental.

bfd/
	* elf64-ppc.c (struct ppc_local_dyn_relocs): Renamed from
	ppc_dyn_relocs.  Add rel_count field.  Update uses.
	(struct ppc_dyn_relocs): New.  Replace all uses of elf_dyn_relocs.
	(struct ppc_link_hash_table): Add relr_alloc, relr_count and
	relr_addr.
	(ppc64_elf_copy_indirect_symbol): Merge rel_count.
	(ppc64_elf_check_relocs): Init rel_count for global and local syms.
	(dec_dynrel_count): Change r_info param to reloc pointer.  Update
	all callers.  Handle decrementing rel_count.
	(allocate_got): Don't allocate space for relative relocs when
	enable_dt_relr.
	(allocate_dynrelocs): Likewise.
	(ppc64_elf_size_dynamic_sections): Likewise.  Handle srelrdyn.
	(ppc_build_one_stub): Don't emit relative relocs on .branch_lt.
	(compare_relr_address, append_relr_off): New functions.
	(got_and_plt_relr_for_local_syms, got_and_plt_relr): Likewise.
	(ppc64_elf_size_stubs): Size .relr.syn.
	(ppc64_elf_build_stubs): Emit .relr.dyn.
	(build_global_entry_stubs_and_plt): Don't output relative relocs
	when enable_dt_relr.
	(write_plt_relocs_for_local_syms): Likewise.
	(ppc64_elf_relocate_section): Likewise.
binutils/
	* testsuite/lib/binutils-common.exp (supports_dt_relr): Add
	powerpc64.
ld/
	* emulparams/elf64ppc.sh: Source dt-relr.sh.
	* testsuite/ld-elf/dt-relr-2b.d: Adjust for powerpc.
	* testsuite/ld-elf/dt-relr-2c.d: Likewise.
	* testsuite/ld-elf/dt-relr-2d.d: Likewise.
	* testsuite/ld-elf/dt-relr-2e.d: Likewise.
2022-01-18 11:18:45 +10:30
..
config testsuite supports_dt_relr 2022-01-13 14:12:43 +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 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +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 PowerPC64 DT_RELR 2022-01-18 11:18:45 +10:30
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 ld: Disable DT_RELR in some -z relro tests 2022-01-13 06:11:23 -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 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-powerpc XCOFF: add support for TLS relocations on hidden symbols 2022-01-10 09:14:57 +01:00
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: Updated the default ISA spec to 20191213. 2022-01-07 18:48:29 +08:00
ld-s12z Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-s390 elf: Remove the 1-page gap before the RELRO segment 2022-01-13 05:20:51 -08:00
ld-scripts elf: Set p_align to the minimum page size if possible 2022-01-05 05:06:18 -08: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 ld: Disable DT_RELR in some -z relro tests 2022-01-13 06:11:23 -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