mirror of
https://github.com/pret/pokediamond.git
synced 2026-04-24 15:06:56 -05:00
40 lines
917 B
Plaintext
40 lines
917 B
Plaintext
/* Linker Script to build Pokemon Diamond */
|
|
|
|
#define BEGIN_SEG(name, addr) \
|
|
_##name##SegmentStart = ADDR(.name); \
|
|
_##name##SegmentRomStart = __romPos; \
|
|
.name addr : AT(__romPos)
|
|
|
|
#define END_SEG(name) \
|
|
_##name##SegmentEnd = ADDR(.name) + SIZEOF(.name); \
|
|
_##name##SegmentRomEnd = __romPos + SIZEOF(.name); \
|
|
_##name##SegmentSize = SIZEOF(.name); \
|
|
__romPos += SIZEOF(.name);
|
|
|
|
SECTIONS {
|
|
__romPos = 0;
|
|
BEGIN_SEG(header, 0x0)
|
|
{
|
|
build/asm/rom_header.o(.text);
|
|
}
|
|
END_SEG(header)
|
|
|
|
__romPos += 0x3E00;
|
|
|
|
BEGIN_SEG(arm9, 0x2000000)
|
|
{
|
|
build/asm/secure.o(.text);
|
|
build/asm/main.o(.text);
|
|
build/asm/rom.o(.text);
|
|
build/src/sub_02000DF4.o(.text);
|
|
build/asm/rom2.o(.text);
|
|
}
|
|
END_SEG(arm9)
|
|
|
|
BEGIN_SEG(rom3, 0x2000000 + SIZEOF(arm9))
|
|
{
|
|
build/asm/rom3.o(.text);
|
|
}
|
|
END_SEG(rom3)
|
|
}
|