aboutsummaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-03-11 15:59:21 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-03-11 15:59:21 +0200
commita7f8049a8126b6fd1565bcde77700ffeca5d4317 (patch)
tree1e5afb65e45ea548ed9a02ac753ba0973710b785 /linker.ld
parentAdd linker script to ld depends (diff)
downloadkernel.cpp-a7f8049a8126b6fd1565bcde77700ffeca5d4317.tar.xz
Map kernel to 0xc000 rather than 0xc010
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld13
1 files changed, 6 insertions, 7 deletions
diff --git a/linker.ld b/linker.ld
index 9383b44..a9c6ec8 100644
--- a/linker.ld
+++ b/linker.ld
@@ -14,12 +14,11 @@ SECTIONS
*(.multiboot.header)
}
- /* Begin putting sections at 1 MiB */
- /* TODO load sections at VADDR_BASE rather than at VADDR_BASE + 1M */
- . = VADDR_BASE + 1M;
+ /* Begin putting sections at 4 MiB */
+ . = VADDR_BASE;
_kernel_start = .;
- .text ALIGN(4K) : AT(ADDR(.text) - VADDR_BASE) {
+ .text ALIGN(4K) : AT(ADDR(.text) - VADDR_BASE + 4M) {
begin_text = .;
*(.multiboot.text)
*(.text*)
@@ -27,14 +26,14 @@ SECTIONS
}
/* Read-only data. */
- .rodata ALIGN(4K) : AT(ADDR(.rodata) - VADDR_BASE) {
+ .rodata ALIGN(4K) : AT(ADDR(.rodata) - VADDR_BASE + 4M) {
begin_rodata = .;
*(.rodata*)
end_rodata = .;
}
/* Read-write data (initialized) */
- .data ALIGN(4K) : AT(ADDR(.data) - VADDR_BASE) {
+ .data ALIGN(4K) : AT(ADDR(.data) - VADDR_BASE + 4M) {
begin_constinit = .;
*(.constinit)
end_constinit = .;
@@ -49,7 +48,7 @@ SECTIONS
}
/* Read-write data (uninitialized) and stack */
- .bss ALIGN(4K) : AT(ADDR(.bss) - VADDR_BASE) {
+ .bss ALIGN(4K) : AT(ADDR(.bss) - VADDR_BASE + 4M) {
begin_bss = .;
*(.pages)
*(.bss)