First commit

This commit is contained in:
2026-01-22 18:09:14 +01:00
committed by Julien THILLARD
commit 7a25e89d4c
21 changed files with 609 additions and 0 deletions

45
ilm.ld Normal file
View File

@@ -0,0 +1,45 @@
/*
* ld directives the for barmetal RISCV
*/
OUTPUT_ARCH( "riscv" )
MEMORY
{
ram (wxa) : ORIGIN = 0x80000000, LENGTH = 128M
}
SECTIONS {
/* The kernel starts at 0x80000000 */
. = 0x80000000;
.text : {
ENTRY(entry)
KEEP(*(.text.entry))
*(.text.init) *(.text) *(.text.*)
_etext = .;
} > ram
.data : {
*(.sdata) *(.sdata.*)
*(.fini)
*(.anno)
*(.rodata) *(.rodata.*)
*(__ex_table)
*(.data) *(.data.*)
_edata = .;
} > ram
.bss : {
/* On veut un alignement sur 8 octets */
. = ALIGN(8);
__bss_start = .;
*(.sbss) *(.sbss.*)
*(.bss) *(.bss.*)
*(scommon) *(COMMON)
. = ALIGN(8);
__bss_end = .;
PROVIDE(_heap_start = __bss_end + 8);
PROVIDE(_heap_end = ORIGIN(ram) + LENGTH(ram));
} > ram
_end = .;
}