summaryrefslogtreecommitdiff
path: root/Kernel/Prekernel/linker.ld
blob: 120452054082db860ec2710b3694cf61064fd305 (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
ENTRY(start)

PHDRS
{
  boot_text PT_LOAD ;
  text PT_LOAD ;
  data PT_LOAD ;
  bss PT_LOAD ;
}

SECTIONS
{
    . = 0x00100000;

    start_of_prekernel_image = .;

    .boot_text ALIGN(4K) : AT (ADDR(.boot_text))
    {
        KEEP(*(.multiboot))
    } :boot_text

    .text ALIGN(4K) : AT (ADDR(.text))
    {
        start_of_prekernel_text = .;
        *(.text*)
    } :text

    .rodata ALIGN(4K) : AT (ADDR(.rodata))
    {
        *(.rodata*)
    } :data

    .data ALIGN(4K) : AT (ADDR(.data))
    {
        *(.data*)
    } :data

    .bss ALIGN(4K) (NOLOAD) : AT (ADDR(.bss))
    {
        *(COMMON)
        *(.bss)
        *(.stack)
        *(.page_tables)
    } :bss

    end_of_prekernel_image = .;
}