allow arm7 to be relocated externally

This commit is contained in:
Dave Murphy 2017-01-08 17:07:59 +00:00
parent 788935c0ce
commit bf52a02c77

View File

@ -26,7 +26,10 @@ _start:
@---------------------------------------------------------------------------------
@ Copy initialized data (data section) from LMA to VMA (EWRAM to IWRAM)
@---------------------------------------------------------------------------------
ldr r1, =__arm7_lma__
adr r0, arm7lma
ldr r1, [r0]
add r1, r0
ldr r2, =__arm7_start__
ldr r4, =__arm7_end__
bl CopyMemCheck
@ -43,14 +46,17 @@ _start:
mov r1, #0 @ char *argv[]
ldr r3, =main
ldr lr,=__libnds_exit
bx r3
@---------------------------------------------------------------------------------
_blx_r3_stub:
@---------------------------------------------------------------------------------
bx r3
arm7lma:
.word __arm7_lma__ - .
.pool
@---------------------------------------------------------------------------------
@ Clear memory to 0x00 if length != 0
@ r0 = Start Address