summaryrefslogtreecommitdiff
path: root/link.ld
blob: 11536c87f9fb07663b504f85b112289814fbedb1 (plain)
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
ENTRY(kmain)
OUTPUT_FORMAT(binary)

KERNEL_VMA = 0x100000;

SECTIONS {
	. = 0x7c00;

	.text.boot : {
		boot/boot.o (.text.boot)
		_boot_end = .;
	}

	. = KERNEL_VMA;
	.text : AT(_boot_end) {
		*(.text.startup)
		*(.text)
		*(.rodata*)
		. = ALIGN(0x1000);
	}

	.data : {
		*(.data)
		. = ALIGN(0x1000);
	}

	.eh_frame : {
		*(.eh_frame)
		. = ALIGN(0x1000);
	}

	.bss : {
		*(.bss)
		. = ALIGN(0x1000);
	}

	/DISCARD/ : {
		*(.comment)
	}
}