-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinker.ld
More file actions
60 lines (50 loc) · 942 Bytes
/
linker.ld
File metadata and controls
60 lines (50 loc) · 942 Bytes
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
59
60
ENTRY(_start)
PHDRS
{
multiboot PT_LOAD FLAGS(5); /* Read + Execute */
text PT_LOAD FLAGS(5); /* Read + Execute */
data PT_LOAD FLAGS(6); /* Read + Write */
}
SECTIONS
{
/* The kernel starts at 1MB */
. = 1M;
kernel_start = .;
.multiboot : AT(ADDR(.multiboot))
{
KEEP(*(.multiboot))
} : multiboot
.text : AT(ADDR(.text))
{
*(.text)
*(.text.*)
} : text
.rodata : AT(ADDR(.rodata))
{
*(.rodata)
*(.rodata.*)
} : data
.ai_model : AT(ADDR(.ai_model))
{
_ai_model_start = .;
KEEP(*(.ai_model*))
_ai_model_end = .;
} : data
.data : AT(ADDR(.data))
{
*(.data)
*(.data.*)
} : data
.bss : AT(ADDR(.bss))
{
*(.bss)
*(.bss.*)
*(COMMON)
} : data
kernel_end = .;
/DISCARD/ :
{
*(.comment)
*(.note*)
}
}