aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/arch/i386/linker.ld
blob: c4bfa3b7905b1441370755b77f8cc7c936cd93fd (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
32
33
34
35
36
37
38
/* Excecution start point symbol */
ENTRY(_start)

SECTIONS
{
    . = 1M;

    /* Used to get the beginning and end address of the kernel */
    _kernel_begin = .;

    /* code. multiboot header comes first */
    .text BLOCK(4K) : ALIGN(4K)
    {
        *(.multiboot)
        *(.text)
    }

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

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

    /* read write data (uninitialized) and stack */
    .bss BLOCK(4K) : ALIGN(4K)
    {
        *(COMMON)
        *(.bss)
    }

    _kernel_end = .;
}