forked from LemonOSProject/LemonOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linkscript-x86_64.ld
executable file
·72 lines (62 loc) · 1.16 KB
/
linkscript-x86_64.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
71
72
ENTRY(entry)
SECTIONS
{
KERNEL_VMA = 0xFFFFFFFF80000000;
. = 0x100000;
.boot.text : {
*(.boot.text)
}
.boot.data :
{
*(.boot.data)
. = ALIGN(4096);
}
. += KERNEL_VMA;
.stivale2hdr : AT(ADDR(.stivale2hdr) - KERNEL_VMA){
KEEP(*(.stivale2hdr))
}
.text : AT(ADDR(.text) - KERNEL_VMA)
{
_code = .;
*(.text)
. = ALIGN(8);
_ctors_start = .;
KEEP(*(.init_array .ctors))
_ctors_end = .;
. = ALIGN(4096);
}
.rodata : AT(ADDR(.rodata) - KERNEL_VMA)
{
_rodata = .;
*(.rodata)
. = ALIGN(4096);
}
.data : AT(ADDR(.data) - KERNEL_VMA)
{
_data = .;
*(.data)
_trampoline = .;
*(.trampoline)
_trampoline_end = .;
. = ALIGN(4096);
}
.eh_frame : AT(ADDR(.eh_frame) - KERNEL_VMA)
{
_ehframe = .;
*(.eh_frame)
. = ALIGN(4096);
}
.bss : AT(ADDR(.bss) - KERNEL_VMA)
{
_bss = .;
*(.bss)
*(COMMON)
. = ALIGN(4096);
_bss_end = .;
}
_end = .;
/DISCARD/ :
{
*(.comment)
}
}