aboutsummaryrefslogtreecommitdiff
path: root/kernel/link.ld
blob: fbe8a8c471b6e42eb5c4f75f5ce153ae842cd40d (plain) (blame)
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
OUTPUT_FORMAT("binary")
OUTPUT_ARCH(i386)
ENTRY(kernel_main)
phys = 0x00009000;

SECTIONS
{
	.text phys : AT(phys) {
		kernel_start = .;
		code = .;
		*(.text)
		*(.rodata)
		. = ALIGN(4096);
	}

	.data : AT(phys + (data - code))
	{
		data = .;
		*(.data)
		. = ALIGN(4096);
	}

	.bss : AT(phys + (bss - code))
	{
		bss = .;
		*(.bss)
		. = ALIGN(4096);
	}

	kernel_end = .;
}