diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 20 | ||||
-rw-r--r-- | firmware/crt0.S | 6 |
2 files changed, 17 insertions, 9 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index 2e70eb957d..daed49a628 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -182,23 +182,31 @@ SECTIONS _iramend = .; } > IRAM +#ifdef IRIVER_H100 + .stack : + { + *(.stack) + stackbegin = .; + . += 0x8000; + stackend = .; + } > IRAM +#else /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section size smaller, and allow the stack to grow into the .iram copy */ .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): { *(.stack) _stackbegin = . - SIZEOF(.iram); - stackbegin = . - SIZEOF(.iram); -#if MEMORYSIZE >= 32 - . += 0x8000 - SIZEOF(.iram); -#else . += 0x2000 - SIZEOF(.iram); -#endif _stackend = .; - stackend = .; } > DRAM +#endif +#ifdef IRIVER_H100 + .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): +#else .bss : +#endif { _edata = .; *(.bss) diff --git a/firmware/crt0.S b/firmware/crt0.S index 8928890eeb..9622493683 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S @@ -282,8 +282,8 @@ irq_handler: .dataloopend: /* Munge the main stack */ - lea _stackbegin,%a2 - lea _stackend,%a4 + lea stackbegin,%a2 + lea stackend,%a4 move.l #0xdeadbeef,%d0 .mungeloop: cmp.l %a2,%a4 @@ -299,7 +299,7 @@ irq_handler: .section .resetvectors vectors: - .long _stackend + .long stackend .long start #else /* Platform: Archos Jukebox |