-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink_ng.ld
54 lines (44 loc) · 1.28 KB
/
link_ng.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
ENTRY(loader) /* the name of the entry label */
/*OUTPUT_ARCH(i686)*/
SECTIONS {
. = 0x00100000; /* the code should be loaded at 1 MB */
PROVIDE(_early_text = .);
.text.early ALIGN (0x1000):
{
*(.text.early)
}
PROVIDE(_end_early_text = .);
PROVIDE(_bss_early = .);
.bss.early ALIGN (0x1000):
{
*(.bss.early)
}
PROVIDE(_end_bss_early = .);
. += 0xc0000000;
PROVIDE(_text = .);
.text ALIGN (0x1000) : AT(ADDR(.text)-0xc0000000)
{
*(.text) /* all text sections from all files */
}
PROVIDE(_end_text = .);
PROVIDE(_rodata = .);
.rodata ALIGN (0x1000) : AT(ADDR(.rodata)-0xc0000000)
{
*(.rodata*) /* all read-only data sections from all files */
}
PROVIDE(_end_rodata = .);
PROVIDE(_data = .);
.data ALIGN (0x1000) : AT(ADDR(.data)-0xc0000000)
{
*(.data) /* all data sections from all files */
}
PROVIDE(_end_data = .);
PROVIDE(_bss = .);
.bss ALIGN (0x1000) : AT(ADDR(.bss)-0xc0000000)
{
*(COMMON) /* all COMMON sections from all files */
*(.bss) /* all bss sections from all files */
}
PROVIDE(_end_bss = .);
PROVIDE(_end = .);
}