Fix lma address error in DS ARM7 crt0

This commit is contained in:
fincs 2017-01-10 16:09:49 +01:00
parent e2600d9ac1
commit 49165d1d26
2 changed files with 3 additions and 3 deletions

View File

@ -35,6 +35,7 @@ SECTIONS
.twl :
{
__arm7i_lma__ = LOADADDR(.twl);
__arm7i_start__ = .;
*(.twl)
*.twl*(.text .stub .text.* .gnu.linkonce.t.*)
@ -64,10 +65,9 @@ SECTIONS
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ewram :crt0
__arm7_lma__ = .;
.text :
{
__arm7_lma__ = LOADADDR(.text);
__arm7_start__ = .;
KEEP (*(SORT_NONE(.init)))
*(.plt)

View File

@ -51,7 +51,7 @@ _start:
ldr r1, =__dsimode @ set DSi mode flag
strb r10, [r1]
ldr r1, =__arm7i_lma
ldr r1, =__arm7i_lma__
ldr r2, =__arm7i_start__
ldr r4, =__arm7i_end__
bl CopyMemCheck