aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-arm/ifunc-7.s
blob: 85ffb686c18ee0e503c9e5da5c5af0215437dae0 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
	.macro	define,name
	.text
	.type	\name,%gnu_indirect_function
\name:
	mov	pc,lr
	.size	\name,.-\name
	.endm

	.macro	test_relocs,name
	bl	\name(PLT)
	ldr	r4,1f
	ldr	r4,2f
1:
	.word	\name(GOT)
2:
	.word	\name(GOT_PREL)

	.data
	.word	\name
	.word	\name - .
	.text
	.endm

	.globl	f3
	.hidden	f3

	define	f1
	define	f3

	.data
foo:
	.word	0x11223344

	.text
	.globl	arm
arm:
	test_relocs foo
	test_relocs f1
	test_relocs f2
	test_relocs f3
	test_relocs f4
	.size	arm,.-arm