-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkernel.ld
70 lines (54 loc) · 1.26 KB
/
kernel.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
59
60
61
62
63
64
65
66
67
68
69
70
mmio = 0xfffffffff5000000;
fb = 0xfffffffff9000000;
bootboot = 0xfffffffffe000000;
environment = 0xfffffffffe002000;
initstack = 0x4000;
PHDRS
{
/* one single loadable segment */
boot PT_LOAD;
}
SECTIONS
{
. = 0xffffffffff000000;
_KERNEL_START = .;
.text : ALIGN (4K) {
_TEXT_START = .;
*(.text*)
. = ALIGN(4K);
_TEXT_END = .;
_DATA_START = .;
*(.data .data.*)
. = ALIGN(4K);
_DATA_END = .;
_RODATA_START = .;
*(.rodata .rodata.*)
*(.gcc_except_table)
*(.got*)
/** pointers to various sections of this file. */
text_start = .; QUAD(_TEXT_START)
text_end = .; QUAD(_TEXT_END)
data_start = .; QUAD(_DATA_START)
data_end = .; QUAD(_DATA_END)
rodata_start = .; QUAD(_RODATA_START)
rodata_end = .; QUAD(_RODATA_END)
bss_start = .; QUAD(_BSS_START)
bss_end = .; QUAD(_BSS_END)
kernel_start = .; QUAD(_KERNEL_START)
kernel_end = .; QUAD(_KERNEL_END)
. = ALIGN(4K);
_RODATA_END = .;
} :boot
.bss (NOLOAD) : ALIGN (4K) {
_BSS_START = .;
*(COMMON)
*(.bss*)
. = ALIGN(4K);
_BSS_END = .;
} :boot
_KERNEL_END = .;
.debug (NOLOAD) : {
*(.debug*)
}
/DISCARD/ : { *(.eh_frame_hdr) *(.eh_frame) *(.comment) }
}