-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlink.ld
More file actions
52 lines (41 loc) · 788 Bytes
/
Copy pathlink.ld
File metadata and controls
52 lines (41 loc) · 788 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
43
44
45
46
47
48
49
50
51
52
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(start)
PHDRS
{
text PT_LOAD FLAGS(5); /* PF_R | PF_X */
data PT_LOAD FLAGS(6); /* PF_R | PF_W */
}
SECTIONS {
. = 0x00100000;
_kernel_start = .;
.multiboot ALIGN(8) : { KEEP(*(.multiboot)) } :text
.text : {
*(.text)
*(.text*)
*(.rodata)
*(.rodata*)
} :text
.data : {
*(.data)
*(.data*)
} :data
.bss : {
*(.bss)
*(.bss*)
*(COMMON)
. = ALIGN(16);
_stack_start = .;
. += 65536; /* 64 KB stack */
_stack_end = .;
. = ALIGN(16);
_tss_buffer = .;
. += 104; /* TSS */
} :data
.heap (NOLOAD) : {
. = ALIGN(8);
_heap_start = .;
. = . + 512 * 1024 * 1024; /* 512 MB кучи */
_heap_end = .;
} :data
_kernel_end = .;
}