-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinker.ld
More file actions
53 lines (44 loc) · 834 Bytes
/
linker.ld
File metadata and controls
53 lines (44 loc) · 834 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
/* linker.ld - linker script for multiboot2 kernel */
ENTRY(_start)
SECTIONS
{
/* Start at 1 MB (standard for multiboot) */
. = 1M;
/* Multiboot header MUST come first */
.multiboot ALIGN(8) : {
KEEP(*(.multiboot))
}
/* Code section */
.text ALIGN(4K) : {
*(.text*)
}
/* Read-only data */
.rodata ALIGN(4K) : {
*(.rodata*)
}
/* Initialized data */
.data ALIGN(4K) : {
*(.data*)
}
/* Component objects */
.compobjs ALIGN(8) : {
*(.compobjs*)
}
/* Component pointers - with symbols for iteration */
.comps ALIGN(8) : {
__start_comps = .;
*(.comps*)
__stop_comps = .;
}
/* Uninitialized data */
.bss ALIGN(4K) : {
*(COMMON)
*(.bss*)
}
/* Discard unnecessary sections */
/DISCARD/ : {
*(.comment)
*(.note*)
*(.eh_frame*)
}
}