aboutsummaryrefslogtreecommitdiffstats
path: root/src/linker.ld
blob: 994a50ee29a245fcaad216f28f8277c11611baf1 (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
43
44
45
46
47
48
49
50
51
52
ENTRY(_start)

STACK_SIZE = 1024 * 1024 * 4;

SECTIONS
{
    . = 0x8000;
    __start = .;

    .text : {
        __text_start = .;
        KEEP(*(.text.boot))
        *(.text)
        *(.text.*)
        __text_end = .;
    }

    .rodata : {
        . = ALIGN(8);
        __rodata_start = .;
        *(.rodata)
        *(.rodata.*)
        __rodata_end = .;
    }

    .data : {
        . = ALIGN(8);
        __data_start = .;
        *(.data)
        *(.data.*)
        __data_end = .;
    }

    .bss (NOLOAD) : {
        . = ALIGN(8);
        __bss_start = .;
        *(.bss)
        *(.bss.*)
        *(COMMON)
        __bss_end = .;
    }

    .stack (NOLOAD) : {
        . = ALIGN(8);
        __stack_start = .;
        . = . + STACK_SIZE;
        __stack_end = .;
    }

    . = ALIGN(8);
    __end = .;
}