-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinker.ld
64 lines (48 loc) · 1.02 KB
/
linker.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
PHDRS
{
text PT_LOAD FLAGS(5); /* Read and Execute */
rodata PT_LOAD FLAGS(4); /* Read-Only */
data PT_LOAD FLAGS(6); /* Read and Write */
bss PT_LOAD FLAGS(6); /* Read and Write */
}
ENTRY(_asm_start)
SECTIONS
{
. = 2M;
.text ALIGN(4K) :
{
__text_start = .;
*(.multiboot)
*(.text)
*(.text.*)
__text_end = .;
} :text
.rodata ALIGN(4K) :
{
__rodata_start = .;
__ctors_start = .;
*(.init_array)
__ctors_end = .;
__dtors_start = .;
*(.fini_array)
__dtors_end = .;
*(.rodata)
*(.rodata.*)
__rodata_end = .;
} :rodata
.data ALIGN(4K) :
{
__data_start = .;
*(.data)
*(.data.*)
__data_end = .;
} :data
.bss ALIGN(4K) :
{
__bss_start = .;
*(COMMON)
*(.bss)
*(.bss.*)
__bss_end = .;
} :bss
}