Gets rust running rv64iM

This commit is contained in:
2025-11-16 12:19:49 +01:00
parent 674c399ef6
commit 4955f9b952
5 changed files with 33 additions and 11 deletions

View File

@@ -1,16 +1,36 @@
OUTPUT_ARCH( "riscv" )
ENTRY (_start)
MEMORY
{
/* Ram */
ram (rawx) : ORIGIN = 0x00010000, LENGTH = 0x10000
}
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
. = ORIGIN(ram);
.text : {
*(.text._start)
*(.text .text.*)
} >ram
. = ALIGN(8);
.data : { *(.data) }
.bss : { *(.bss) }
.rodata : {
*(.rodata .rodata.*)
} >ram
. = ALIGN(8);
.data : { *(.data .data.* ) } >ram
.bss : { *(.bss .bss.* ) } >ram
. = ALIGN(8);
PROVIDE(_memory_start = . );
PROVIDE(_memory_end = 0x20000);
PROVIDE(_memory_end = ORIGIN(ram) + LENGTH(ram));
PROVIDE(_stack_size = 1024); /* 1 KiB */
PROVIDE(_stack_start = _memory_end);
PROVIDE(_stack_end = _stack_start - _stack_size);