aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-aarch64/pcrel.s
blob: c5e18d019e4e802273bcbd88b232699fa2f582d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	.hidden global_b
	.text
	.align 2
main:
	# R_AARCH64_ADR_PREL_PG_HI21
	# R_AARCH64_ADR_PREL_PG_HI21_NC
	# R_AARCH64_ADR_LO_21
	adrp	x0, :pg_hi21:global_a
	adrp	x1, :pg_hi21_nc:global_a
	adr	x2, global_a

	#R_AARCH64_LD_PREL_LO19
	ldr	x3, global_a

	# R_AARCH64_PREL16
	# R_AARCH64_PREL32
	# R_AARCH64_PREL64
	.hword	global_a - .
	.word	global_a - .
	.xword	global_a - .

	# Defined global symbol may bind externally because of copy relocation,
	# while defined hidden symbol binds locally.  LD should be able to
	# differenciate this.
	adrp	x0, :pg_hi21:global_b
	.xword	global_b - .