Add first user program hello_world.rs

This commit is contained in:
Yifan Wu 2020-11-18 14:48:13 +08:00
parent c701cd00ce
commit db0c174f52
79 changed files with 343 additions and 0 deletions

26
user/src/linker.ld Normal file
View file

@ -0,0 +1,26 @@
OUTPUT_ARCH(riscv)
ENTRY(_start)
BASE_ADDRESS = 0x80040000;
SECTIONS
{
. = BASE_ADDRESS;
.text : {
*(.text.entry)
*(.text .text.*)
}
.rodata : {
*(.rodata .rodata.*)
}
.data : {
*(.data .data.*)
}
.bss : {
*(.bss .bss.*)
}
/DISCARD/ : {
*(.eh_frame)
*(.debug*)
}
}