aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/protected-data.s
blob: 8c8072d3345a0dc123084c2618dd66ecdab65afc (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
27
28
29
	.syntax unified

	.data
	.protected	var
	.global	var
	.align	2
	.type	var, %object
	.size	var, 4
var:
	.word	1

	.text
	.align	2
	.global	getaddr
	.thumb
	.thumb_func
	.type	getaddr, %function
getaddr:
	ldr	r3, 2f
	ldr	r2, 2f+4
1:
	add	r3, pc
	ldr	r0, [r3, r2]
	bx	lr
	.align	2
2:
	.word	_GLOBAL_OFFSET_TABLE_-(1b+4)
	.word	var(GOT)
	.size	getaddr, .-getaddr