-
Notifications
You must be signed in to change notification settings - Fork 10
/
linker.ld
41 lines (34 loc) · 809 Bytes
/
linker.ld
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
/*
* diosix microkernel 'menchi'
*
* Linker script for x86 machines
*
* Maintainer: Chris Williams <diodesign@gmail.com>
*
*/
ENTRY(start32) /* entry point for the kernel */
SECTIONS {
. = 1M; /* start from 1MB load point */
__kernel_start = .;
/* the section that contains our kernel code and read-only data */
.text : ALIGN(0x1000)
{
__kernel_ro_start = ALIGN(0x1000);
KEEP(*(.multiboot_head)) /* keep our multiboot header at the start */
*(.text*)
*(.rodata*)
__kernel_ro_end = ALIGN(0x1000);
}
.data : ALIGN(0x1000)
{
__kernel_rw_start = ALIGN(0x1000);
*(.data)
}
.bss : ALIGN(0x1000)
{
*(COMMON)
*(.bss)
__kernel_rw_end = ALIGN(0x1000);
}
__kernel_end = ALIGN(0x1000);
}