blob: 88f2e75be130617abfdab6a49b0320dca2fef354 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/* SPDX-License-Identifier: copyleft-next-0.3.1 */
/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */
OUTPUT_ARCH(riscv)
ENTRY(main)
SECTIONS {
/* This is apparently necessary. I *think* it is to tell the linker that
* the kernel should be able to run in the bottom half of the address
* space, but I don't know for sure and this feels like a fairly major
* hack.
* @todo look into this further.
*/
. = ABSOLUTE(VM_KERNEL);
__kernel_start = .;
.text ALIGN(4K) : AT(0) {
*(.kernel.start);
*(.text*);
}
.rodata : {
*(.rodata*)
}
.data : {
*(.data*)
*(.sdata*)
}
.bss : {
*(.sbss*) *(.bss*) *(COMMON)
}
__kernel_end = .;
__kernel_size = __kernel_end - __kernel_start;
.garbage : {
*(.note*)
*(.riscv.attributes)
}
}
|