-
Notifications
You must be signed in to change notification settings - Fork 1
/
link64.ld
50 lines (42 loc) · 798 Bytes
/
link64.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
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(Realm32)
KERNEL_VMA = 0x140000;
SECTIONS
{
. = KERNEL_VMA;
.text : AT(ADDR(.text) - KERNEL_VMA)
{
_code = .;
*(.text)
*(.rodata*)
. = ALIGN(4096);
}
.data : AT(ADDR(.data) - KERNEL_VMA)
{
_data = .;
*(.data)
. = ALIGN(4096);
}
.ehframe : AT(ADDR(.ehframe) - KERNEL_VMA)
{
_ehframe = .;
*(.ehframe)
. = ALIGN(4096);
}
.bss : AT(ADDR(.bss) - KERNEL_VMA)
{
_bss = .;
*(.bss)
/*
* You usually need to include generated COMMON symbols
* under kernel BSS section or use gcc's -fno-common
*/
*(COMMON)
. = ALIGN(4096);
}
_end = .;
/DISCARD/ :
{
*(.comment*)
}
}