rCore-Tutorial-v3/os/src/linker.ld

46 lines
635 B
Plaintext
Raw Normal View History

2020-11-11 12:50:00 +04:00
OUTPUT_ARCH(riscv)
ENTRY(_start)
BASE_ADDRESS = 0x80020000;
SECTIONS
{
. = BASE_ADDRESS;
skernel = .;
stext = .;
.text : {
*(.text.entry)
*(.text .text.*)
2020-11-11 12:50:00 +04:00
}
. = ALIGN(4K);
etext = .;
srodata = .;
.rodata : {
*(.rodata .rodata.*)
2020-11-11 12:50:00 +04:00
}
. = ALIGN(4K);
erodata = .;
sdata = .;
.data : {
*(.data .data.*)
2020-11-11 12:50:00 +04:00
}
. = ALIGN(4K);
edata = .;
2020-12-04 13:23:35 +04:00
sbss_with_stack = .;
2020-11-11 12:50:00 +04:00
.bss : {
*(.bss.stack)
sbss = .;
*(.bss .bss.*)
2020-11-11 12:50:00 +04:00
}
. = ALIGN(4K);
ebss = .;
ekernel = .;
/DISCARD/ : {
*(.eh_frame)
}
}