-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathkernel.ld
More file actions
executable file
·45 lines (42 loc) · 1.02 KB
/
Copy pathkernel.ld
File metadata and controls
executable file
·45 lines (42 loc) · 1.02 KB
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
OUTPUT_FORMAT(elf64-x86-64)
OUTPUT_ARCH(i386:x86-64)
/* Bei _start soll die Ausfuehrung losgehen */
ENTRY(_start)
/*
* Hier wird festgelegt, in welcher Reihenfolge welche Sektionen in die Binary
* geschrieben werden sollen
*/
SECTIONS
{
/*
* . ist die aktuelle Position in der Datei. Wir wollen den Kernel wie gehabt
* an 1 MB laden, also muessen wir dort die erste Sektion hinlegen
*/
. = 0x100000;
kernel_start = .;
/*
* Der Multiboot-Header muss zuerst kommen (in den ersten 8 kB).
* Die Standardsektionen einfach hintereinander weg einbinden.
*/
kernel_code_start = .;
.text : {
/*(multiboot) kein Multibootheader vorhanden.*/
*(.text*)
}
kernel_code_end = .;
.data ALIGN(4096) : {
*(.data)
}
/*cdi_drivers ALIGN(4096) : {
__start_cdi_drivers = .;
*(cdi_drivers)
}
__stop_cdi_drivers = .;*/
.rodata ALIGN(4096) : {
*(.rodata)
}
.bss ALIGN(4096) : {
*(.bss)
}
kernel_end = .;
}