ableos/kernel/lds/riscv64-virt.ld

67 lines
1.3 KiB
Plaintext
Raw Normal View History

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 */
2023-02-21 08:51:13 -06:00
PROVIDE(_usable_memory_start = ALIGN(4M));
PROVIDE(_usable_memory_size = 0x88000000 - _usable_memory_start);
/DISCARD/ : {
*(.comment)
*(.eh_frame)
}
}