1
0
Fork 0
forked from AbleOS/ableos
ableos_time/kernel/lds/riscv64-virt.ld

67 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2023-03-30 16:43:04 -05:00
OUTPUT_ARCH(riscv)
ENTRY(_start)
START_ADDRESS = 0x80200000;
SECTIONS {
. = START_ADDRESS;
.text : {
PROVIDE(_text_start = .);
*(.text.entry)
. = ALIGN(4K);
*(.text .text.*)
PROVIDE(_text_end = .);
}
. = ALIGN(4K);
.rodata : {
PROVIDE(_rodata_start = .);
*(.rodata .rodata.*)
PROVIDE(_rodata_end = .);
}
. = ALIGN(4K);
.data : {
PROVIDE(_data_start = .);
*(.data .data.*)
PROVIDE(_data_end = .);
}
. = ALIGN(4K);
.sdata : {
PROVIDE(_sdata_start = .);
*(.sdata)
*(.sdata.*)
*(.srodata.*)
*(.gnu.linkonce.s.*)
PROVIDE(_sdata_end = .);
}
. = ALIGN(4K);
.bss : {
PROVIDE(_bss_start = .);
*(.sbss*)
*(.bss.stack)
*(.bss .bss.*)
PROVIDE(_initial_kernel_heap_start = .);
PROVIDE(_initial_kernel_heap_size = 1024 * 1024);
. += _initial_kernel_heap_size;
PROVIDE(_bss_end = .);
}
/* FIXME: Currently this has to be aligned to PAGE_SIZE << MAX_ORDER */
PROVIDE(_usable_memory_start = ALIGN(4M));
PROVIDE(_usable_memory_size = 0x88000000 - _usable_memory_start);
/DISCARD/ : {
*(.comment)
*(.eh_frame)
}
}