SummerCart64/sw/controller/loader.ld

69 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-05-15 15:47:12 +02:00
MEMORY {
2022-08-03 08:53:30 +02:00
rom (rx) : org = 0x08000000, len = 4k
2022-05-15 15:47:12 +02:00
ram (rwx) : org = 0x20000000, len = 8k
}
ENTRY(Reset_Handler)
SECTIONS {
.isr_vector : {
. = ALIGN(4);
KEEP(*(.isr_vector))
. = ALIGN(4);
} > rom
2022-08-03 08:53:30 +02:00
.startup : {
. = ALIGN(4);
*(.text.Reset_Handler)
. = ALIGN(4);
} > rom
2022-05-15 15:47:12 +02:00
.text : {
2022-08-03 08:53:30 +02:00
_sitext = LOADADDR(.text);
2022-05-15 15:47:12 +02:00
. = ALIGN(4);
2022-08-03 08:53:30 +02:00
_stext = .;
2022-05-15 15:47:12 +02:00
*(.text)
*(.text*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4);
_etext = .;
2022-08-03 08:53:30 +02:00
} > ram AT > rom
2022-05-15 15:47:12 +02:00
2022-08-03 08:53:30 +02:00
.bss : {
2022-05-15 15:47:12 +02:00
. = ALIGN(4);
2022-08-03 08:53:30 +02:00
_sbss = .;
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)
2022-05-15 15:47:12 +02:00
. = ALIGN(4);
2022-08-03 08:53:30 +02:00
_ebss = .;
__bss_end__ = _ebss;
} > ram
2022-05-15 15:47:12 +02:00
.data : {
_sidata = LOADADDR(.data);
. = ALIGN(4);
_sdata = .;
*(.data)
*(.data*)
. = ALIGN(4);
_edata = .;
} > ram AT > rom
2022-08-03 08:53:30 +02:00
.rodata : {
_sirodata = LOADADDR(.rodata);
2022-05-15 15:47:12 +02:00
. = ALIGN(4);
2022-08-03 08:53:30 +02:00
_srodata = .;
*(.rodata)
*(.rodata*)
. = ALIGN(8);
_erodata = .;
} > ram AT > rom
2022-05-15 15:47:12 +02:00
2022-08-03 08:53:30 +02:00
_app_header = ORIGIN(rom) + LENGTH(rom);
_app_magic = _app_header + 16;
2022-05-15 15:47:12 +02:00
_estack = ORIGIN(ram) + LENGTH(ram);
}