SummerCart64/sw/bootloader/N64.ld

58 lines
1.3 KiB
Plaintext
Raw Normal View History

MEMORY {
2022-09-18 20:48:10 +02:00
framebuffer (rw) : org = 0x8026A000, len = 600k
ram (rwx) : org = 0x80300000, len = 1M
rom (r) : org = 0xB0000000, len = 1028k
}
ENTRY(entry_handler)
2022-01-07 15:01:43 +01:00
__exception_stack_size = 8k;
2022-01-18 19:21:49 +01:00
__stack_size = 16k;
SECTIONS {
2022-09-18 20:48:10 +02:00
.boot : {
KEEP(*(.text.rom_header));
KEEP(*(.text.ipl3));
2022-09-18 20:48:10 +02:00
} > rom
.framebuffer (NOLOAD) : SUBALIGN(64) {
*(.framebuffer .framebuffer.*)
} > framebuffer
2022-05-15 15:47:12 +02:00
.text : SUBALIGN(4) {
*(.text.entry_handler)
*(.text .text.* .gnu.linkonce.t.*)
2022-09-18 20:48:10 +02:00
*(.assets .assets.*)
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.data .data.* .gnu.linkonce.d.*)
_gp = . + 0x8000;
*(.sdata .sdata.* .gnu.linkonce.s.*)
*(.lit8 .lit4)
2022-09-18 20:48:10 +02:00
} > ram AT > rom
.bss : {
2022-09-18 20:48:10 +02:00
. = ALIGN(8);
2022-05-15 15:47:12 +02:00
_sbss = .;
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon .scommon.*)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
2022-01-07 15:01:43 +01:00
. = ALIGN(8);
2022-05-15 15:47:12 +02:00
_ebss = .;
2022-09-18 20:48:10 +02:00
} > ram
_sheap = .;
2022-09-18 20:48:10 +02:00
. = ORIGIN(ram) + LENGTH(ram) - __exception_stack_size - __stack_size;
_eheap = .;
2022-01-07 15:01:43 +01:00
. += __exception_stack_size;
_esp = .;
. += __stack_size;
_sp = .;
/DISCARD/ : {
*(.MIPS.*)
}
}