summaryrefslogtreecommitdiff
path: root/sys/arch/i386/conf
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2018-10-26 15:00:55 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2018-10-26 15:00:55 +0000
commitb7ab2f3e95f571d057cf21dc3536bfb3deaf0ab4 (patch)
treed88edf86743838e57f5ccd9621ec2c7ac949cf5d /sys/arch/i386/conf
parent5ae5fd6130160bb02bce0304132e5f25f9f89ec5 (diff)
With lld the calculation of the entry point was wrong since
LOADADDR(.text) is only available after the description of the text section. Instead simply use ENTRY(start) like we do on amd64. The bootloader strips the high bits from the entry point address already, so using the virtual address as the entry point address works. with/ok kettenis@
Diffstat (limited to 'sys/arch/i386/conf')
-rw-r--r--sys/arch/i386/conf/ld.script6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/i386/conf/ld.script b/sys/arch/i386/conf/ld.script
index 269318dde62..7760974c2b8 100644
--- a/sys/arch/i386/conf/ld.script
+++ b/sys/arch/i386/conf/ld.script
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.script,v 1.9 2018/04/11 15:44:08 bluhm Exp $ */
+/* $OpenBSD: ld.script,v 1.10 2018/10/26 15:00:54 naddy Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -41,9 +41,7 @@ __ALIGN_SIZE = 0x1000;
__kernel_base_virt = 0xd0200000 + SIZEOF_HEADERS;
__kernel_base_phys = __kernel_base_virt & 0xfffffff;
-/* We use physical address to jump to kernel */
-start_phys = LOADADDR(.text) + (start - __kernel_base_virt);
-ENTRY(start_phys)
+ENTRY(start)
SECTIONS
{
__kernel_text_virt = __kernel_base_virt;