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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
.text
.p2align 4
.globl _start
_start:
mov ip, sp
stmdb sp!, {r11, ip, lr, pc}
bl app_func
bl lib_func1
bl lib_func2
ldmia sp, {r11, sp, lr}
bx lr
.p2align 4
.globl app_tfunc_close
.type app_tfunc_close,%function
.thumb_func
.code 16
app_tfunc_close:
push {lr}
bl lib_func2
pop {pc}
bx lr
@ We will place the section .far_arm at 0x2100000.
.section .far_arm, "xa"
.arm
.p2align 4
.globl app_func
.type app_func,%function
app_func:
mov ip, sp
stmdb sp!, {r11, ip, lr, pc}
bl lib_func1
bl lib_func2
ldmia sp, {r11, sp, lr}
bx lr
.arm
.p2align 4
.globl app_func2
.type app_func2,%function
app_func2:
bx lr
@ We will place the section .far_thumb at 0x2200000.
.section .far_thumb, "xa"
.p2align 4
.globl app_tfunc
.type app_tfunc,%function
.thumb_func
.code 16
app_tfunc:
push {lr}
bl lib_func2
pop {pc}
bx lr
.data
.long data_obj
|