Commit | Line | Data |
---|---|---|
5fa9e92f CL |
1 | .text |
2 | .p2align 4 | |
3 | .globl _start | |
4 | _start: | |
5 | mov ip, sp | |
6 | stmdb sp!, {r11, ip, lr, pc} | |
7 | bl app_func | |
022f8312 CL |
8 | bl lib_func1 |
9 | bl lib_func2 | |
5fa9e92f CL |
10 | ldmia sp, {r11, sp, lr} |
11 | bx lr | |
12 | ||
13 | .p2align 4 | |
14 | .globl app_tfunc_close | |
15 | .type app_tfunc_close,%function | |
16 | .thumb_func | |
17 | .code 16 | |
18 | app_tfunc_close: | |
19 | push {lr} | |
20 | bl lib_func2 | |
21 | pop {pc} | |
22 | bx lr | |
23 | ||
24 | @ We will place the section .far_arm at 0x2100000. | |
25 | .section .far_arm, "xa" | |
26 | ||
27 | .arm | |
28 | .p2align 4 | |
29 | .globl app_func | |
30 | .type app_func,%function | |
31 | app_func: | |
32 | mov ip, sp | |
33 | stmdb sp!, {r11, ip, lr, pc} | |
34 | bl lib_func1 | |
022f8312 | 35 | bl lib_func2 |
5fa9e92f CL |
36 | ldmia sp, {r11, sp, lr} |
37 | bx lr | |
38 | ||
39 | .arm | |
40 | .p2align 4 | |
41 | .globl app_func2 | |
42 | .type app_func2,%function | |
43 | app_func2: | |
44 | bx lr | |
45 | ||
46 | @ We will place the section .far_thumb at 0x2200000. | |
47 | .section .far_thumb, "xa" | |
48 | ||
49 | .p2align 4 | |
50 | .globl app_tfunc | |
51 | .type app_tfunc,%function | |
52 | .thumb_func | |
53 | .code 16 | |
54 | app_tfunc: | |
55 | push {lr} | |
56 | bl lib_func2 | |
57 | pop {pc} | |
58 | bx lr | |
59 | ||
60 | .data | |
61 | .long data_obj |