Commit | Line | Data |
---|---|---|
34e77a92 RS |
1 | .macro define,name |
2 | .type \name,%gnu_indirect_function | |
3 | \name: | |
4 | mov pc,lr | |
5 | .size \name,.-\name | |
6 | .endm | |
7 | ||
8 | .macro test_relocs,name | |
9 | bl \name | |
10 | ldr r4,1f | |
11 | ldr r4,2f | |
12 | 1: | |
13 | .word \name(GOT) | |
14 | 2: | |
15 | .word \name(GOT_PREL) | |
16 | .endm | |
17 | ||
18 | .global f2 | |
19 | ||
20 | .global f3 | |
21 | .hidden f3 | |
22 | ||
23 | define f1 | |
24 | define f2 | |
25 | define f3 | |
26 | ||
27 | .globl _start | |
28 | _start: | |
29 | test_relocs foo | |
30 | test_relocs f1 | |
31 | test_relocs f2 | |
32 | test_relocs f3 | |
33 | .size _start,.-_start | |
34 | ||
35 | .data | |
36 | foo: | |
37 | .word 0x11223344 | |
38 | .word __irel_start | |
39 | .word __irel_end |