summaryrefslogtreecommitdiffstats
path: root/kernel/kernel.ld
blob: 5a4566f0b3e83b231808aabfbdb565f01ef11a95 (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
ENTRY(entrypoint)            /* the entry point */

SECTIONS {
    . = 0x100000;            /* all sections located above 1MB */

    .bootloader ALIGN(4K):   /* multiboot header first (needs to reside within the first 8KB) */
    {
        *(.bootloader)
    }

    .stack ALIGN(4K):        /* kernel stack */
    {
        *(.stack)
    }

    .text ALIGN(4K) :        /* code */
    {
        *(.text*)
    }

    .rodata ALIGN(4K) :      /* read-only data */
    {
        *(.rodata*)
    }

    .data ALIGN(4K) :        /* initialized data */
    {
        *(.data*)
    }

    .bss ALIGN(4K) :         /* unitialized data */
    {
        *(COMMON)
        *(.bss*)
    }
}