-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootloader.ld
More file actions
executable file
·38 lines (35 loc) · 837 Bytes
/
Copy pathbootloader.ld
File metadata and controls
executable file
·38 lines (35 loc) · 837 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
OUTPUT_FORMAT(elf32-i386)
OUTPUT_ARCH(i386:i386)
/* 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 10 MB laden, also muessen wir dort die erste Sektion hinlegen
*/
. = 0xA00000;
bootloader_start = .;
/*
* Der Multiboot-Header muss zuerst kommen (in den ersten 8 kB).
* Die Standardsektionen einfach hintereinander weg einbinden.
*/
.text : {
*(multiboot)
*(.text)
}
.data ALIGN(4096) : {
*(.data)
}
.rodata ALIGN(4096) : {
*(.rodata)
}
.bss ALIGN(4096) : {
*(.bss)
}
bootloader_end = .;
}