SummerCart64/sw/n64/N64.ld

47 lines
1018 B
Plaintext
Raw Normal View History

2021-11-25 23:11:36 +01:00
MEMORY {
rdram (rwx) : org = 0x80300000, len = 1M
flash (r) : org = 0xB0000000, len = 90k
}
ENTRY(entry_handler)
2021-11-30 00:47:35 +01:00
__stack_size = 64k;
2021-11-25 23:11:36 +01:00
SECTIONS {
.flash : {
2021-11-30 00:47:35 +01:00
KEEP(*(.text.rom_header));
KEEP(*(.text.ipl3));
__ipl3_font = LOADADDR(.flash) + 0xB70;
2021-11-25 23:11:36 +01:00
} > flash
.text : {
*(.text.entry_handler)
*(.text .text.* .gnu.linkonce.t.*)
2021-11-30 00:47:35 +01:00
*(.rodata .rodata.* .gnu.linkonce.r.*)
2021-11-25 23:11:36 +01:00
*(.data .data.* .gnu.linkonce.d.*)
2021-11-30 00:47:35 +01:00
_gp = . + 0x8000;
2021-11-25 23:11:36 +01:00
*(.sdata .sdata.* .gnu.linkonce.s.*)
2021-12-05 01:09:50 +01:00
*(.lit8 .lit4)
2021-11-30 00:47:35 +01:00
. = ALIGN(4);
2021-11-25 23:11:36 +01:00
} > rdram AT > flash
.bss : {
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon .scommon.*)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
2021-11-30 00:47:35 +01:00
. = ALIGN(4);
2021-11-25 23:11:36 +01:00
} > rdram
2021-11-30 00:47:35 +01:00
_sheap = .;
. = ORIGIN(rdram) + LENGTH(rdram) - __stack_size;
_eheap = .;
. += __stack_size;
_sp = .;
2021-11-25 23:11:36 +01:00
/DISCARD/ : {
*(.MIPS.*)
}
}