|
发表于 2010-3-30 01:27:27
|
显示全部楼层
只要看懂下面的汇编就可以实现了.我已经做好了动态加载了.
CODE32
AREA |aOUR_ENGINE_AS|, CODE, READONLY
IMPORT dl_main
EXPORT aOUR_extern_main_demo1
IMPORT dl_main
IMPORT |Image$$RO$$Limit|
aOUR_extern_main_demo1
stmfd r13!,{r14}
sub r14,pc,#12
ldr r2,=|Image$$RO$$Limit|
add r2, r2,r14
str r2,sp_bf
blx dl_main
ldmfd r13!,{lr}
bx r14
bx r14
EXPORT sp_bf
sp_bf
bx r0
bx r0
bx r14
EXPORT R9_bf
R9_bf
bx r14
bx r14
bx r14
EXPORT KEEP_SP
KEEP_SP
str r9, R9_bf
ldr r9,sp_bf
bx lr
EXPORT LOAD_SP
LOAD_SP
ldr r9,sp_bf
bx lr
EXPORT REAL_SP
REAL_SP
ldr r9,R9_bf
bx lr
EXPORT GET_SP
GET_SP
ldr r0,sp_bf
bx lr
END |
|