From 1d3ff04f2dd47c71aa0b2d7e7601f0d31b3eab60 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 26 Sep 2019 22:58:06 +0200 Subject: Added higher half kernel with paging --- src/kernel/linker.ld | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'src/kernel/linker.ld') diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld index 6461b2b..3e209fc 100644 --- a/src/kernel/linker.ld +++ b/src/kernel/linker.ld @@ -1,25 +1,24 @@ -OUTPUT_FORMAT("binary") ENTRY(start) -phys = 0x00100000; -SECTIONS -{ - .text phys : AT(phys) { - code = .; - *(.text) - *(.rodata*) - . = ALIGN(4096); - } - .data : AT(phys + (data - code)) - { - data = .; - *(.data) - . = ALIGN(4096); - } - .bss : AT(phys + (bss - code)) - { - bss = .; - *(.bss) - . = ALIGN(4096); - } - end = .; -} +OUTPUT_FORMAT(elf32-i386) + +SECTIONS { + . = 0xC0100000; + + .text : AT(ADDR(.text) - 0xC0000000) { + *(.text) + *(.rodata*) + } + + .data ALIGN (0x1000) : AT(ADDR(.data) - 0xC0000000) { + *(.data) + } + + .bss : AT(ADDR(.bss) - 0xC0000000) { + _sbss = .; + *(COMMON) + *(.bss) + _ebss = .; + } + + end = .; +} \ No newline at end of file -- cgit v1.2.3