-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathlinker.ld
58 lines (54 loc) · 1.3 KB
/
linker.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
53
54
55
56
57
58
ENTRY(_start_bootloader)
SECTIONS {
. = 0x4000;
. = ALIGN(0x1000);
__smp_trampoline_start = .;
.smp_trampoline :
{
*(.smp_trampoline)
}
. = ALIGN(0x1000);
__smp_trampoline_end = .;
. = 1M;
__bootloader_start = .;
.boot : ALIGN(2)
{
/* ensure that the multiboot header is at the beginning */
KEEP(*(.multiboot_header))
}
.bootloader : ALIGN(16)
{
*(.init_bootloader)
*(.text .text.*)
*(.rodata .rodata.*)
*(.data .data.*)
*(.bss .bss.*)
*(.got .got.*)
}
. = ALIGN(0x1000);
__bootloader_end = .;
. = 2M;
__kernel_start = .;
.kernel :
{
KEEP(*(.kernel))
}
. = ALIGN(0x1000);
__kernel_end = .;
. = ALIGN(0x1000);
__page_table_start = .;
_p4 = .;
. += 0x1000;
_p3 = .;
. += 0x1000;
_p2_tables_start = .;
. += 0x4000; /* One p2 table equals 1Gb memory mapped */
_p2_tables_end = .;
_p1_tables_start = .;
. += 0x1000; /* First p1 table to map 0-2Mb with 4Kb pages*/
_p1_tss_tables_start = .;
. += 0x1000 * 128; /* 1Mb per core for interrupt stacks (max 256 cores) */
_p1_tables_end = .;
__page_table_end = .;
__minimum_mem_requirement = .;
}