diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-11 15:59:21 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-11 15:59:21 +0200 |
commit | a7f8049a8126b6fd1565bcde77700ffeca5d4317 (patch) | |
tree | 1e5afb65e45ea548ed9a02ac753ba0973710b785 /linker.ld | |
parent | Add linker script to ld depends (diff) | |
download | kernel.cpp-a7f8049a8126b6fd1565bcde77700ffeca5d4317.tar.xz |
Map kernel to 0xc000 rather than 0xc010
Diffstat (limited to 'linker.ld')
-rw-r--r-- | linker.ld | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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) |