18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
pc .req r15
.text
.align 0
.global _tramp
_tramp:
@ Immediate constants are a problem. I take the indirect load approach
@ because I don't want 4 instructions for each constant.
ldr ip,[pc,#_function-.-8]
ldr ip,[ip,#0]
stmfd sp!,{ip}
ldr ip,[pc,#_data-.-8]
ldr ip,[ip,#0]
ldmfd sp!,{pc}^
.global _data
.align 0
_data:
.word 0x73554711
.global _function
.align 0
_function:
.word 0xbabebec0
|
<
|
<
<
|
<
<
>
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
pc .req r15
.text
.align 0
.global _tramp
_tramp:
@ Immediate constants are a problem. I take the indirect load approach
@ because I don't want 4 instructions for each constant.
add ip,pc,#8
ldr pc,[pc]
.global _data
.align 0
_data:
.word 0x73554711
.align 0
_function:
.word 0xbabebec0
.global _function
|