From f784575fdbbee6e096866c0b506fd660dc5ffe1c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 28 May 2020 19:40:44 +0200 Subject: Started higher-half kernel --- src/kernel/linker.ld | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/kernel/linker.ld') diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld index f134ccb..b7bde1d 100644 --- a/src/kernel/linker.ld +++ b/src/kernel/linker.ld @@ -1,34 +1,32 @@ -ENTRY(_start) +ENTRY(boot) + +phys = 0x100000; +offset = 0xC0000000; +virt = offset + phys; SECTIONS { - . = 1M; + . = virt; - .text BLOCK(4K) : ALIGN(4K) + .text : AT (ADDR (.text) - offset) { - *(.multiboot) - *(.start_section) *(.text) - } - - .rodata BLOCK(4K) : ALIGN(4K) - { *(.rodata) + . = ALIGN(0x1000); } - .data BLOCK(4K) : ALIGN(4K) + .data : AT (ADDR (.data) - offset) { *(.data) + . = ALIGN(0x1000); } - .bss BLOCK(4K) : ALIGN(4K) + .bss : AT (ADDR (.bss) - offset) { *(.COMMON) *(.bss) + . = ALIGN(0x1000); } - .end BLOCK(4K) : ALIGN(4K) - { - *(.end) - } + KERNEL_END = .; } \ No newline at end of file -- cgit v1.2.3