-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathlinker.ld
More file actions
58 lines (45 loc) · 1.16 KB
/
linker.ld
File metadata and controls
58 lines (45 loc) · 1.16 KB
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
53
54
55
56
57
58
ENTRY(_start)
SECTIONS {
. = 1M;
__kernel_start = .;
.boot : {
*(.multiboot_header)
}
.driver_registry : ALIGN(64) {
__driver_registry_start = .;
KEEP(*(.driver_registry))
__driver_registry_end = .;
}
.early_initcall_registry : ALIGN(64) {
__early_initcall_registry_start = .;
KEEP(*(SORT(.early_initcall_registry.*)))
__early_initcall_registry_end = .;
}
.late_initcall_registry : ALIGN(64) {
__late_initcall_registry_start = .;
KEEP(*(SORT(.late_initcall_registry.*)))
__late_initcall_registry_end = .;
}
.vma_partition_registry : ALIGN(64) {
__vma_partition_registry_start = .;
KEEP(*(.vma_partition_registry))
__vma_partition_registry_end = .;
}
.text : ALIGN(4K) {
*(.text*)
}
.rodata : ALIGN(4K) {
*(.rodata*)
}
.data : ALIGN(4K) {
*(.data*)
}
.bss : ALIGN(4K) {
__bss_start = .;
*(COMMON)
*(.bss*)
__bss_end = .;
}
__kernel_end = .;
}
ASSERT(__kernel_end <= ((1 << 30)), "kernel image too large (must fit in low 1MB - 1GB)");