From c74adfecd0b21ea84f7e98629549f7489c78edc9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 24 Mar 2012 03:01:01 +0100 Subject: Relocate kernel at bootup Grub is not able to map us at high addresses. We can however make it load us at low addresses (through the linker script mapping), then use segmentation to move ourselves to high addresses, and switch to C which uses high addresses (through _START definition). * i386/ldscript: Force mapping kernel at 0x100000, regardless of the value of _START. * i386/i386at/boothdr.S (boot_entry): Set up initial segments to project the bootstrap linear space to high addresses. --- i386/ldscript | 1 + 1 file changed, 1 insertion(+) (limited to 'i386/ldscript') diff --git a/i386/ldscript b/i386/ldscript index bbf5698..a63ff77 100644 --- a/i386/ldscript +++ b/i386/ldscript @@ -13,6 +13,7 @@ SECTIONS */ . = _START; .text : + AT (0x00100000) { *(.text.start) *(.text .stub .text.* .gnu.linkonce.t.*) -- cgit v1.2.3