feat: Linkerscript now tracks RAM/ROM usage
Based on https://github.com/pret/pokeemerald/pull/1952
This commit is contained in:
+17
-16
@@ -1,24 +1,26 @@
|
||||
gNumMusicPlayers = 4;
|
||||
gMaxLines = 0;
|
||||
|
||||
SECTIONS {
|
||||
. = 0x2000000;
|
||||
MEMORY
|
||||
{
|
||||
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
||||
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
||||
}
|
||||
|
||||
ewram (NOLOAD) :
|
||||
SECTIONS {
|
||||
|
||||
.ewram.sbss 0x2000000 (NOLOAD) :
|
||||
ALIGN(4)
|
||||
{
|
||||
gHeap = .;
|
||||
|
||||
. = 0x1C000;
|
||||
|
||||
*(ewram_data);
|
||||
*(.sbss);
|
||||
} > EWRAM
|
||||
|
||||
. = 0x40000;
|
||||
}
|
||||
|
||||
. = 0x3000000;
|
||||
|
||||
iwram (NOLOAD) :
|
||||
iwram 0x3000000 (NOLOAD) :
|
||||
ALIGN(4)
|
||||
{
|
||||
/* .bss starts at 0x3000000 */
|
||||
@@ -30,8 +32,7 @@ SECTIONS {
|
||||
*(COMMON);
|
||||
end = .;
|
||||
__end__ = .;
|
||||
. = 0x8000;
|
||||
}
|
||||
} > IWRAM
|
||||
|
||||
. = 0x8000000;
|
||||
|
||||
@@ -43,25 +44,25 @@ SECTIONS {
|
||||
src/crt0.o(.text);
|
||||
src/main.o(.text);
|
||||
*(.text*);
|
||||
} =0
|
||||
} > ROM =0
|
||||
|
||||
script_data :
|
||||
ALIGN(4)
|
||||
{
|
||||
*(script_data);
|
||||
} =0
|
||||
} > ROM =0
|
||||
|
||||
.data :
|
||||
ALIGN(4)
|
||||
{
|
||||
*(.data*);
|
||||
} =0
|
||||
} > ROM =0
|
||||
|
||||
.rodata :
|
||||
ALIGN(4)
|
||||
{
|
||||
*(.rodata*);
|
||||
} =0
|
||||
} > ROM =0
|
||||
|
||||
/* DWARF 2 sections */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
|
||||
Reference in New Issue
Block a user