diff --git a/ld_script.txt b/ld_script.txt index 54c794e52..a2cc3e6e7 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -12,6 +12,7 @@ SECTIONS { . = 0x1C000; + src/*.o(.ewram_data); *libc.a:impure.o(.data); *libc.a:locale.o(.data); @@ -26,6 +27,8 @@ SECTIONS { { /* .bss starts at 0x3000000 */ + src/*.o(.bss); + data/*.o(.bss); /* .bss.code starts at 0x30028E0 */ src/m4a.o(.bss.code); @@ -45,8 +48,8 @@ SECTIONS { ALIGN(4) { src/rom_header.o(.text); - src/rom_header_gf.o(.text*); - src/crt0.o(.text); + src/rom_header_gf.o(.text*); + src/crt0.o(.text); src/main.o(.text); src/gpu_regs.o(.text); src/dma3_manager.o(.text); @@ -1027,6 +1030,14 @@ SECTIONS { src/graphics.o(.rodata); } =0 + extra : + ALIGN(4) + { + src/*.o(.text); + src/*.o(.rodata); + data/*.o(.rodata); + } = 0 + /* DWARF 2 sections */ .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } diff --git a/ld_script_modern.txt b/ld_script_modern.txt index fc6c0d0b7..6a874f84a 100644 --- a/ld_script_modern.txt +++ b/ld_script_modern.txt @@ -14,7 +14,7 @@ SECTIONS { *(ewram_data); . = 0x40000; -} + } . = 0x3000000; @@ -38,17 +38,13 @@ SECTIONS { .text : ALIGN(4) { + src/rom_header.o(.text*); + src/rom_header_gf.o(.text.*); src/crt0.o(.text); + src/main.o(.text); *(.text*); } =0 - .text.unlikely : - ALIGN(4) - { - src/crt0.o(.text.unlikely); - *(.text.unlikely*); - } =0 - script_data : ALIGN(4) {