Introduce new .text.sorted.* sections.
[deliverable/binutils-gdb.git] / ld / testsuite / ld-arm / ifunc-8.s
CommitLineData
34e77a92
RS
1 .syntax unified
2 .arch armv6t2
3
4 .macro define,name,type
5 .type \name,%gnu_indirect_function
6 \type
7\name:
8 mov pc,lr
9 .size \name,.-\name
10 .endm
11
12 .macro define2,name
13 define aa\name,.arm
14 define at\name,.arm
15 define ab\name,.arm
16 define ta\name,.thumb_func
17 define tt\name,.thumb_func
18 define tb\name,.thumb_func
19 .endm
20
21 .macro test_relocs,name,width
22 bl \name(PLT)
23 b\width \name
24 beq\width \name
25 ldr r4,1f
26 ldr r4,2f
271:
28 .word \name(GOT)
292:
30 .word \name(GOT_PREL)
31 .endm
32
33 .macro test_relocs2,name,type,width
34 test_relocs a\type\name,\width
35 test_relocs t\type\name,\width
36 test_relocs ab\name,\width
37 test_relocs tb\name,\width
38 .endm
39
40 .macro diff,name
41 .word \name
42 .word \name-.
43 .endm
44
45 .macro alldirs,doit,name
46 \doit aa\name
47 \doit at\name
48 \doit ab\name
49 \doit ta\name
50 \doit tt\name
51 \doit tb\name
52 .endm
53
54 define2 f1
55 define2 f3
56
57 alldirs .globl,f3
58 alldirs .hidden,f3
59
60 .globl arm
61 .type arm,%function
62 .arm
63arm:
64 test_relocs foo
65 test_relocs2 f1,a,
34e77a92 66 test_relocs2 f3,a,
34e77a92
RS
67 .size arm,.-arm
68
69 .globl _thumb
70 .type _thumb,%function
71 .thumb_func
72_thumb:
73 test_relocs foo
74 test_relocs2 f1,t,.w
34e77a92 75 test_relocs2 f3,t,.w
34e77a92
RS
76 .size _thumb,.-_thumb
77
78 .data
79foo:
80 .word 0x11223344
81 alldirs diff,f1
34e77a92 82 alldirs diff,f3
This page took 0.376431 seconds and 4 git commands to generate.