-
Notifications
You must be signed in to change notification settings - Fork 1
/
kfs.ld
52 lines (42 loc) · 900 Bytes
/
kfs.ld
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
42
43
44
45
46
47
48
49
50
51
52
/* entry point of our kernel */
ENTRY(kfs_entry)
/* Setup kernel in hh memory */
kmem_pos = 0xC0000000;
SECTIONS
{
. = 0x00100000;
.multiboot : {
*(.multiboot)
}
.boottext : {
*(.boottext)
}
. += kmem_pos;
kernel_memory_start = .;
/* TEXT */
.text ALIGN(4K) : AT(ADDR(.text) - kmem_pos) {
section_text_start = .;
*(.text*)
section_text_end = .;
}
/* RODATA */
.rodata ALIGN(4K) : AT(ADDR(.rodata) - kmem_pos) {
section_rodata_start = .;
*(.rodata*)
section_rodata_end = .;
}
/* DATA */
.data ALIGN(4K) : AT(ADDR(.data) - kmem_pos) {
section_data_start = .;
*(.data*)
section_data_end = .;
}
/* BSS */
.bss ALIGN(4K) : AT(ADDR(.bss) - kmem_pos) {
section_bss_start = .;
*(COMMON)
*(.bss)
section_bss_end = .;
}
kernel_memory_end = .;
}