-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel.ld
More file actions
45 lines (36 loc) · 875 Bytes
/
kernel.ld
File metadata and controls
45 lines (36 loc) · 875 Bytes
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
/*
* INFO:
*
* - https://www.math.utah.edu/docs/info/ld_3.html
* - https://sourceware.org/binutils/docs-2.25/ld/Scripts.html#Scripts
*/
ENTRY(start_kernel)
SECTIONS
{
/*
* "." is special linker variable containing the current output location counter.
* Set it here to 1MB to skip BIOS address space and all of the lower part of memory-mapped IO on a IBM PC platform
*/
. = 0x00100000;
.multiboot :
{
*(.multiboot) /* the Multiboot header must be in the first 8192 bytes for Multiboot and 32768 bytes for Multiboot2 */
}
.text :
{
*(.text)
*(.rotext)
*(.rodata)
_end_of_text_seg = ABSOLUTE(.);
}
.data :
{
*(.data)
_end_of_data_seg = ABSOLUTE(.);
}
.bss :
{
*(.bss)
_end_of_bss_seg = ABSOLUTE(.);
}
}