-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathkernel.ld
59 lines (43 loc) · 861 Bytes
/
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
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(start)
SECTIONS
{
. = 0xC0100000;
.text : AT(0x100000) {
*(.text .text.* .stub .gnu.linkonce.t.*)
}
.rodata : {
*(.rodata .rodata.* .gnu.linkonce.r.*)
}
.stab : {
PROVIDE(__STAB_BEGIN__ = .);
*(.stab);
PROVIDE(__STAB_END__ = .);
BYTE(0) /* Force the linker to allocate space
for this section */
}
.stabstr : {
PROVIDE(__STABSTR_BEGIN__ = .);
*(.stabstr);
PROVIDE(__STABSTR_END__ = .);
BYTE(0) /* Force the linker to allocate space
for this section */
}
. = ALIGN(0x1000);
/* The data segment */
PROVIDE(_DATA_START = .);
.data : {
*(.data)
}
PROVIDE(_DATA_END = .);
. = ALIGN(0x1000);
PROVIDE(_BSS_START = .);
.bss : {
*(.bss)
}
PROVIDE(_BSS_END = .);
/DISCARD/ : {
*(.eh_frame .note.GNU-stack)
}
}