Guest
#1172081
I need use arm and thumb is same program , how to make this.
eg.
asm code startup :
.text
.arm
.global _startup
.func _startup
_startup:
ldr sp,=value
ldr r10,=main
adr lr, __main_exit
bx r10
__main_exit: B __main_exit
.size _startup, . - _startup
.endfunc
.global Sub_func
.func Sub_func
Sub_func:
code here
.size Sub_func, . - Sub_func
.endfunc
.equ value , 0x01000000
.end
C code thumb :
int main(void)
{
int x , y ;
Sub_func(); <--- function in arm mode , how to call this function ?
x = 10 ;
}