-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel.ld
40 lines (30 loc) · 822 Bytes
/
kernel.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
/* This is a linker script for our kernel
It defines the memory layout for our kernel executable
Entry point of kernel is the boot function*/
ENTRY(boot)
SECTIONS {
/* Our base address */
. = 0x80200000;
/* Memory allocation for code of the program. */
.text :{
KEEP(*(.text.boot));
*(.text .text.*);
}
/* Memory allocation for read only data. */
.rodata : ALIGN(8) {
*(.rodata .rodata.*);
}
/* Memory allocation for read and write data. */
.data : ALIGN(8) {
*(.data .data.*);
}
/* Memory allocation for read and write initialized to zero */
.bss : ALIGN(8) {
__bss = .;
*(.bss .bss.* .sbss .sbss.*);
__bss_end = .;
}
. = ALIGN(8);
. += 256 * 1024; /* 256KB */
__stack_top = .;
}