binutils-gdb/ld/testsuite/ld-powerpc/abs32-reloc.s
Alan Modra 7a9361c00d PowerPC32 treatment of absolute symbols
As already done for PowerPC64, fix dynamic relocs for absolute symbols.
The patch also tidies the dynamic reloc handling code in check_relocs,
removing leftover comments and code from when check_relocs was called
as each object file was read in.

bfd/
	* elf32-ppc.c (ppc_elf_check_relocs): Set isym and ifunc earlier.
	Rearrange tests for dynamic relocs, handling absolute symbols.
	(allocate_dynrelocs): Don't allocate dynamic relocs for locally
	defined absolute symbols.
	(ppc_elf_size_dynamic_sections): Similarly.
	(ppc_elf_relocate_section): Similarly.
ld/
	* testsuite/ld-powerpc/abs32-pie.d,
	* testsuite/ld-powerpc/abs32-pie.r,
	* testsuite/ld-powerpc/abs32-reloc.s,
	* testsuite/ld-powerpc/abs32-shared.d,
	* testsuite/ld-powerpc/abs32-shared.r,
	* testsuite/ld-powerpc/abs32-static.d,
	* testsuite/ld-powerpc/abs32-static.r: New tests.
	* testsuite/ld-powerpc/powerpc.exp: Run them.
2022-05-04 14:41:56 +09:30

23 lines
242 B
ArmAsm

.globl x
.hidden x
.data
.p2align 2
x:
.long x
.long a
.long b
.long c
.text
.p2align 2
.globl _start
.type _start,@function
_start:
0:
lwz 7,x@got(30)
lwz 8,a@got(30)
lwz 9,b@got(30)
lwz 10,c@got(30)
.size _start,.-_start