2022-12-24 05:13:42 +00:00
|
|
|
ENTRY(Start)
|
|
|
|
|
|
|
|
gNumMusicPlayers = 4;
|
|
|
|
gMaxLines = 0;
|
|
|
|
gInitialMainCB2 = CB2_TestRunner;
|
|
|
|
|
2023-12-08 20:01:26 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
|
|
|
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
|
|
|
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
|
|
|
}
|
2022-12-24 05:13:42 +00:00
|
|
|
|
2023-12-08 20:01:26 +00:00
|
|
|
SECTIONS {
|
2024-01-02 14:24:52 +00:00
|
|
|
|
|
|
|
.ewram ORIGIN(EWRAM) : AT (__ewram_lma)
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
__ewram_start = .;
|
|
|
|
*(.ewram*)
|
|
|
|
__ewram_end = .;
|
|
|
|
} > EWRAM
|
|
|
|
|
|
|
|
.ewram.sbss (NOLOAD) :
|
2022-12-24 05:13:42 +00:00
|
|
|
ALIGN(4)
|
|
|
|
{
|
2024-01-02 14:24:52 +00:00
|
|
|
src/*.o(.sbss);
|
|
|
|
test/*.o(.sbss);
|
2024-10-13 07:31:31 +01:00
|
|
|
. = ALIGN(4);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > EWRAM
|
2022-12-24 05:13:42 +00:00
|
|
|
|
2024-01-02 14:24:52 +00:00
|
|
|
.iwram ORIGIN(IWRAM) : AT (__iwram_lma)
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
__iwram_start = .;
|
|
|
|
*(.iwram*);
|
2024-10-13 07:31:31 +01:00
|
|
|
. = ALIGN(4);
|
2024-01-02 14:24:52 +00:00
|
|
|
__iwram_end = .;
|
|
|
|
} > IWRAM
|
|
|
|
|
|
|
|
.iwram.sbss (NOLOAD) :
|
2022-12-24 05:13:42 +00:00
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
src/*.o(.bss);
|
|
|
|
data/*.o(.bss);
|
|
|
|
test/*.o(.bss);
|
|
|
|
*libc.a:*.o(.bss*);
|
|
|
|
*libgcc.a:*.o(.bss*);
|
|
|
|
*libnosys.a:*.o(.bss*);
|
|
|
|
|
|
|
|
src/m4a.o(.bss.code);
|
|
|
|
|
2024-10-16 00:56:56 +01:00
|
|
|
src/*.o(common_data);
|
2022-12-24 05:13:42 +00:00
|
|
|
src/*.o(COMMON);
|
|
|
|
data/*.o(COMMON);
|
|
|
|
test/*.o(COMMON);
|
|
|
|
*libc.a:sbrkr.o(COMMON);
|
2024-10-13 07:31:31 +01:00
|
|
|
. = ALIGN(4);
|
2023-07-14 09:50:55 +01:00
|
|
|
|
|
|
|
/* .persistent starts at 0x3007F00 */
|
|
|
|
/* WARNING: This is the end of the IRQ stack, if there's too
|
|
|
|
* much data it WILL be overwritten. */
|
|
|
|
. = 0x7F00;
|
|
|
|
test/*.o(.persistent);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > IWRAM
|
2023-07-14 09:50:55 +01:00
|
|
|
|
2023-12-08 20:01:26 +00:00
|
|
|
/* BEGIN ROM DATA */
|
2022-12-24 05:13:42 +00:00
|
|
|
. = 0x8000000;
|
|
|
|
|
|
|
|
.text :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
src/rom_header.o(.text);
|
|
|
|
src/rom_header_gf.o(.text.*);
|
2023-11-10 11:08:36 +00:00
|
|
|
src/rom_header_rhh.o(.text.*);
|
2022-12-24 05:13:42 +00:00
|
|
|
src/*.o(.text);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
script_data :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
data/*.o(script_data);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
lib_text :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
*libagbsyscall.a:*.o(.text*);
|
|
|
|
*libgcc.a:*.o(.text*);
|
|
|
|
*libc.a:*.o(.text*);
|
|
|
|
*libnosys.a:*.o(.text*);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
.rodata :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
2023-09-19 11:15:03 +01:00
|
|
|
src/*.o(.rodata*);
|
|
|
|
data/*.o(.rodata*);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
song_data :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
sound/songs/*.o(.rodata);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
|
|
|
lib_rodata :
|
|
|
|
SUBALIGN(4)
|
|
|
|
{
|
|
|
|
*libgcc.a:*.o(.rodata*);
|
|
|
|
*libc.a:*.o(.rodata*);
|
|
|
|
*libc.a:*.o(.data*);
|
|
|
|
src/libisagbprn.o(.rodata);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
2024-01-02 14:24:52 +00:00
|
|
|
.data.iwram :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
__iwram_lma = .;
|
|
|
|
. = . + (__iwram_end - __iwram_start);
|
|
|
|
} > ROM = 0
|
|
|
|
|
|
|
|
.data.ewram :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
__ewram_lma = .;
|
|
|
|
. = . + (__ewram_end - __ewram_start);
|
|
|
|
} > ROM = 0
|
|
|
|
|
2022-12-24 05:13:42 +00:00
|
|
|
tests :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
__start_tests = .;
|
|
|
|
test/*.o(.tests);
|
|
|
|
__stop_tests = .;
|
|
|
|
test/*.o(.text);
|
2023-09-19 11:15:03 +01:00
|
|
|
test/*.o(.rodata*);
|
2023-12-08 20:01:26 +00:00
|
|
|
} > ROM =0
|
2022-12-24 05:13:42 +00:00
|
|
|
|
2023-10-23 21:12:17 +01:00
|
|
|
__rom_end = .;
|
|
|
|
|
2023-12-20 16:33:45 +00:00
|
|
|
dacs 0x9FFC000 :
|
|
|
|
ALIGN(4)
|
|
|
|
{
|
|
|
|
test/*.o(.dacs);
|
|
|
|
} > ROM =0
|
|
|
|
|
2022-12-24 05:13:42 +00:00
|
|
|
/* DWARF debug sections.
|
|
|
|
Symbols in the DWARF debugging sections are relative to the beginning
|
|
|
|
of the section so we begin them at 0. */
|
|
|
|
|
|
|
|
/* DWARF 1 */
|
|
|
|
.debug 0 : { *(.debug) }
|
|
|
|
.line 0 : { *(.line) }
|
|
|
|
|
|
|
|
/* GNU DWARF 1 extensions */
|
|
|
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
|
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
|
|
|
|
|
|
/* DWARF 1.1 and DWARF 2 */
|
|
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
|
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
|
|
|
|
|
|
/* DWARF 2 */
|
|
|
|
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
|
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
|
|
.debug_line 0 : { *(.debug_line) }
|
|
|
|
.debug_frame 0 : { *(.debug_frame) }
|
|
|
|
.debug_str 0 : { *(.debug_str) }
|
|
|
|
.debug_loc 0 : { *(.debug_loc) }
|
|
|
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
|
|
|
|
|
|
/* Discard everything not specifically mentioned above. */
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(*);
|
|
|
|
}
|
|
|
|
}
|