mirror of
https://github.com/pret/pokediamond.git
synced 2026-03-28 13:14:57 -05:00
99 lines
1.9 KiB
Plaintext
99 lines
1.9 KiB
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(ARM7Overlay, 0)
|
|
{
|
|
}
|
|
END_SEG(ARM7Overlay)
|
|
|
|
BEGIN_SEG(header, 0x0)
|
|
{
|
|
build/asm/rom_header.o(.text);
|
|
. = 0x4000;
|
|
} =0
|
|
END_SEG(header)
|
|
|
|
BEGIN_SEG(arm9, 0x2000000)
|
|
{
|
|
build/asm/secure.o(.text);
|
|
build/asm/entry.o(.text);
|
|
build/asm/main.o(.text);
|
|
build/src/sub_02000DF4.o(.text);
|
|
build/asm/arm9_thumb.o(.text);
|
|
build/asm/rom2.o(.text);
|
|
}
|
|
END_SEG(arm9)
|
|
|
|
garbage :
|
|
{
|
|
build/asm/unk_10b724.o(.text);
|
|
}=0
|
|
|
|
. = 0x10B800;__romPos = .;
|
|
BEGIN_SEG(ARM9Overlay, 0)
|
|
{
|
|
build/asm/arm9overlay.o(.text);
|
|
}
|
|
END_SEG(ARM9Overlay)
|
|
|
|
. = 0x10C400;__romPos = .;
|
|
BEGIN_SEG(rom3, 0) /* shrug */
|
|
{
|
|
build/asm/rom3.o(.text);
|
|
}
|
|
END_SEG(rom3)
|
|
|
|
. = 0x30D000;__romPos = .;
|
|
BEGIN_SEG(arm7, 0x02380000)
|
|
{
|
|
build/asm/arm7_rom.o(.text);
|
|
}
|
|
END_SEG(arm7)
|
|
|
|
. = 0x336400;__romPos = .;
|
|
BEGIN_SEG(FileNameTable, 0)
|
|
{
|
|
build/asm/filenametable.o(.text);
|
|
}
|
|
END_SEG(FileNameTable)
|
|
|
|
. = 0x337A00;__romPos = .;
|
|
BEGIN_SEG(FileAllocationTable, 0)
|
|
{
|
|
build/asm/fat.o(.text);
|
|
}
|
|
END_SEG(FileAllocationTable)
|
|
|
|
. = 0x338600;__romPos = .;
|
|
BEGIN_SEG(Icon, __romPos)
|
|
{
|
|
build/asm/icon.o(.text);
|
|
build/asm/title.o(.text);
|
|
}
|
|
END_SEG(Icon)
|
|
|
|
. = 0x339000;__romPos = .;
|
|
BEGIN_SEG(NARC, 0)
|
|
{
|
|
build/asm/narc.o(.text);
|
|
}
|
|
END_SEG(NARC)
|
|
|
|
/DISCARD/ :
|
|
{
|
|
*(*);
|
|
}
|
|
}
|