summaryrefslogtreecommitdiffstats
path: root/kernel/kernel.ld
blob: da9e019cda69c133ce7bc4caaa81227d47792730 (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*)
    }
}