aboutsummaryrefslogtreecommitdiff
path: root/defs/x86_64-linker.ld
blob: 7783bc26ce762fd58fa44699b64501acb1f1180b (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
SECTIONS
{
    PROVIDE (___KERNEL_START__ = .);
    . = 0x100000;     /* system's start address */

    .text :
    {
        *(".text")
        *(".text.*")
        *(".text$")
    }

    .data :
    {
        *(".data")
        *(".data$")
    }

    .rodata :
    {
        *(".rodata")
        *(".rodata$")
        *(".rodata.*")
    }

    .bss :
    {
        ___BSS_START__ = .;
        *(".bss")
        *(".bss.*")
        ___BSS_END__ = .;
    }

    /* global page table for 64-bit long mode */
    .global_pagetable ALIGN(4096) (NOLOAD) :
    {
        *(".global_pagetable")
    }

    . = ALIGN(4096);
    PROVIDE (___KERNEL_END__ = .);
}