54 lines
968 B
Plaintext
54 lines
968 B
Plaintext
OUTPUT_ARCH(riscv)
|
|
ENTRY(_start)
|
|
|
|
/* Every boundary below is page aligned: the kernel maps each range with
|
|
its own permissions (W^X), see mmu::init_kernel_page_table. */
|
|
SECTIONS {
|
|
. = 0x80200000;
|
|
_text_start = .;
|
|
|
|
.text : {
|
|
*(.text.entry)
|
|
*(.text .text.*)
|
|
}
|
|
|
|
. = ALIGN(4096);
|
|
_text_end = .;
|
|
|
|
.rodata : {
|
|
*(.rodata .rodata.*)
|
|
*(.srodata .srodata.*)
|
|
}
|
|
.eh_frame : {
|
|
*(.eh_frame)
|
|
}
|
|
|
|
. = ALIGN(4096);
|
|
_rodata_end = .;
|
|
|
|
.data : {
|
|
*(.data .data.*)
|
|
*(.sdata .sdata.*)
|
|
}
|
|
|
|
. = ALIGN(4096);
|
|
.bss : {
|
|
_bss_start = .;
|
|
*(.bss .bss.*)
|
|
*(.sbss .sbss.*)
|
|
_bss_end = .;
|
|
}
|
|
|
|
/* Left unmapped, so overflowing the kernel stack faults instead of
|
|
silently overwriting .bss. */
|
|
. = ALIGN(4096);
|
|
_stack_guard = .;
|
|
. += 4096;
|
|
|
|
_stack_bottom = .;
|
|
. += 0x80000;
|
|
_stack_top = .;
|
|
|
|
_heap_start = .;
|
|
}
|