From a7f8049a8126b6fd1565bcde77700ffeca5d4317 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 11 Mar 2021 15:59:21 +0200 Subject: Map kernel to 0xc000 rather than 0xc010 --- linker.ld | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'linker.ld') 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) -- cgit v1.2.1