-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinker.ld
More file actions
42 lines (37 loc) · 823 Bytes
/
linker.ld
File metadata and controls
42 lines (37 loc) · 823 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
ENTRY(_start42)
SECTIONS
{
. = 0x00100000;
/* The kernel will live at 3GB + 1MB in the virtual address space, */
/* which will be mapped to 1MB in the physical address space. */
/* Note that we page-align the sections. */
_kernel_start = .;
.multiboot.data : {
*(.multiboot.data)
}
.multiboot.text : {
*(.multiboot.text)
}
. += 0x80000000;
/* Add a symbol that indicates the start address of the kernel. */
.text ALIGN (4K) : AT (ADDR (.text) - 0x80000000)
{
*(.text)
}
.rodata ALIGN (4K) : AT (ADDR (.rodata) - 0x80000000)
{
*(.rodata)
}
.data ALIGN (4K) : AT (ADDR (.data) - 0x80000000)
{
*(.data)
}
.bss ALIGN (4K) : AT (ADDR (.bss) - 0x80000000)
{
*(COMMON)
*(.bss)
*(.bootstrap_stack)
}
/* Add a symbol that indicates the end address of the kernel. */
_kernel_end = .;
}