aboutsummaryrefslogtreecommitdiff
path: root/kernel/link.ld
blob: 5a63e337f8b67db068d6a057d5d84b86dd9306d1 (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 = 0x00050000;

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 = .;
}