some linker script updates to work even more properly for newlib i think

This commit is contained in:
2025-12-24 11:42:55 +01:00
parent 96c2cbf7ae
commit 3f789442c0

24
link.ld
View File

@@ -14,17 +14,33 @@ SECTIONS {
} > RAM
.data : ALIGN(8) {
_data = .;
_data_start = .;
*(.data*)
_edata = .;
_data_end = .;
} > RAM
.bss : ALIGN(8) {
_bss = .;
_bss_start = .;
*(.bss*)
*(COMMON)
_ebss = .;
_bss_end = .;
} > RAM
.sdata : ALIGN(8) {
_sdata_start = .;
*(.sdata*)
_sdata_end = .;
} > RAM
.sbss : ALIGN(8) {
_sbss_start = .;
*(.sbss*)
_sbss_end = .;
} > RAM
__global_pointer$ = _sdata_start + ((_sdata_end - _sdata_start + _sbss_end - _sbss_start) / 2);
_heap_start = ALIGN(8);
_stack_top = ORIGIN(RAM) + LENGTH(RAM);
}