From b56a9f37b11c70ac6632157354e5168191d9bf4b Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sat, 16 Jun 2007 04:11:14 +0000 Subject: [PATCH] *** empty log message *** --- dkarm-eabi/crtls/ds_arm9_crt0.s | 3 +++ dkarm-eabi/crtls/gba_cart.ld | 6 +++--- dkarm-eabi/crtls/gba_mb.ld | 17 ++++++++--------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dkarm-eabi/crtls/ds_arm9_crt0.s b/dkarm-eabi/crtls/ds_arm9_crt0.s index b34ad1b..aa60c3f 100644 --- a/dkarm-eabi/crtls/ds_arm9_crt0.s +++ b/dkarm-eabi/crtls/ds_arm9_crt0.s @@ -198,6 +198,9 @@ _start: ldr r3, =__libc_init_array @ global constructors bl _call_via_r3 + ldr r3, =initSystem + bl _call_via_r3 @ jump to user code + mov r0, #0 @ int argc mov r1, #0 @ char *argv[] ldr r3, =main diff --git a/dkarm-eabi/crtls/gba_cart.ld b/dkarm-eabi/crtls/gba_cart.ld index 36e4b7b..c82ac29 100644 --- a/dkarm-eabi/crtls/gba_cart.ld +++ b/dkarm-eabi/crtls/gba_cart.ld @@ -60,8 +60,8 @@ __text_start = ORIGIN(rom); __eheap_end = ORIGIN(ewram) + LENGTH(ewram); __iwram_start = ORIGIN(iwram); __iwram_top = ORIGIN(iwram) + LENGTH(iwram);; -__sp_irq = __iwram_top - 0x100; -__sp_usr = __sp_irq - 0x100; +__sp_irq = __iwram_top - 0x060; +__sp_usr = __sp_irq - 0x0a0; __irq_flags = 0x03007ff8; SECTIONS @@ -255,7 +255,6 @@ SECTIONS __ewram_end = __sbss_end ; __eheap_start = __sbss_end; __end__ = __sbss_end; - end = __sbss_end; /* EZF Advance strips trailing 0xff bytes, add a pad section so nothing important is removed */ .pad ALIGN(4) : AT (__pad_lma) @@ -263,6 +262,7 @@ SECTIONS LONG(0x52416b64) LONG(0x4d) . = ALIGN(4); /* REQUIRED. LD is flaky without it. */ + __rom_end__ = ABSOLUTE(.); } = 0xff diff --git a/dkarm-eabi/crtls/gba_mb.ld b/dkarm-eabi/crtls/gba_mb.ld index 2ca55dc..b8d801d 100644 --- a/dkarm-eabi/crtls/gba_mb.ld +++ b/dkarm-eabi/crtls/gba_mb.ld @@ -53,8 +53,9 @@ __text_start = ORIGIN(ewram); __eheap_end = ORIGIN(ewram) + LENGTH(ewram); __iwram_start = ORIGIN(iwram); __iwram_top = ORIGIN(iwram) + LENGTH(iwram);; -__sp_irq = __iwram_top - 0x100; -__sp_usr = __sp_irq - 0x100; + +__sp_irq = __iwram_top - 0x060; +__sp_usr = __sp_irq - 0x0a0; __irq_flags = 0x03007ff8; SECTIONS @@ -254,16 +255,14 @@ SECTIONS .ewram7 { *(.ewram7) . = ALIGN(4);} .ewram8 { *(.ewram8) . = ALIGN(4);} .ewram9 { *(.ewram9) . = ALIGN(4);} + __ewram_overlay_end = ABSOLUTE(.); } >ewram = 0xff - __ewram_overlay_end = __load_stop_ewram9 ; - - __eheap_start = __load_stop_ewram1 ; - - _end = __load_stop_ewram1; - __end__ = __load_stop_ewram1 ; /* v1.3 */ - end = __load_stop_ewram1; + __eheap_start = __ewram_overlay_end ; + _end = __ewram_overlay_end; + __end__ = __ewram_overlay_end; + __rom_end__ = __ewram_overlay_end; /* Stabs debugging sections. */ .stab 0 : { *(.stab) }