summaryrefslogtreecommitdiff
path: root/src/kernel/linker.ld
blob: a910d4e302fa04cb6812ba6ec38e28be45732cea (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
41
42
ENTRY(_start)

SECTIONS
{
	. = 0;
	.shared BLOCK(4K) : ALIGN(4K)
	{
		*(.multiboot)
		*(.shared)
		_shared_len = .;
	}

	. = 1M;
	.text BLOCK(4K) : ALIGN(4K)
	{
		_kern_start = .;
		*(.text)
	}
	.rodata BLOCK(4K) : ALIGN(4K)
	{
		*(.rodata)
	}
	.data BLOCK(4K) : ALIGN(4K)
	{
		*(.data)
	}
	_data_end = .;
	.bss BLOCK(4K) : ALIGN(4K)
	{
		*(COMMON)
		*(.bss)

		. += 16K;
		_isr_big_stack = .;

		. += 16K;
		_stack_top = .;
	}
	_bss_end = (. + 0xFFF) & ~0xFFF; /* aligned to 4K */
	pbitmap = _bss_end;
	pbitmap_start = _bss_end;
}