-
Notifications
You must be signed in to change notification settings - Fork 2
/
kernel.lds
66 lines (56 loc) · 1.06 KB
/
kernel.lds
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
61
62
63
64
65
66
OUTPUT_FORMAT(elf64-aarch64)
ENTRY(start)
PHDRS
{
headers PT_PHDR PHDRS;
text PT_LOAD FILEHDR PHDRS;
rodata PT_LOAD;
data PT_LOAD;
dynamic PT_DYNAMIC;
}
SECTIONS
{
. = SIZEOF_HEADERS;
. = 0x1000;
_IMAGE_START = .;
.text : {
_TEXT_BEGIN = .;
*(.text)
_TEXT_END = .;
} :text
.init_array : ALIGN(0x1000) {
_INIT_BEGIN = .;
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
_INIT_END = .;
} :rodata
.rodata : {
_RODATA_BEGIN = .;
*(.rodata)
_RODATA_END = .;
} :rodata
.data.rel.ro : {
_RELRO_BEGIN = .;
*(.data.rel.ro)
_RELRO_END = .;
} :rodata
.rela.dyn : {
_RELA_BEGIN = .;
*(.rela.dyn)
_RELA_END = .;
} :rodata
.dynamic : {
_DYNAMIC = .;
*(.dynamic)
} :rodata :dynamic
.data : {
_DATA_BEGIN = .;
*(.data)
_DATA_END = .;
} :data
.bss : {
_BSS_BEGIN = .;
*(.bss)
_BSS_END = .;
} :data
}