-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinker.ld
48 lines (40 loc) · 992 Bytes
/
linker.ld
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
/* linker.ld
*
* Linker script wich guarantees page aligned sections and provides kernelStart
* and kernelEnd symbols so that the memory manager may determine where NOT to
* write things to.
*
* Copyright (C) 2013 Lasse Schuirmann. All Rights Reserved.
* Written by Lasse Schuirmann ([email protected])
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*/
/* let's dive into the kernel land - with the NASM label 'loader' */
ENTRY (loader)
SECTIONS
{
. = 0x100000;
kernelStart = .;
.text ALIGN (0x1000) :
{
*(.multiboot)
*(.text)
}
.rodata ALIGN (0x1000) :
{
*(.rodata*)
}
.data ALIGN (0x1000) :
{
*(.data)
}
.bss :
{
*(.bss)
}
. = ALIGN(0x1000);
kernelEnd = .;
}