diff options
-rw-r--r-- | sys/arch/amd64/conf/ld.script | 6 | ||||
-rw-r--r-- | sys/arch/i386/conf/ld.script | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/amd64/conf/ld.script b/sys/arch/amd64/conf/ld.script index bc7ce33756e..eb9a549536e 100644 --- a/sys/arch/amd64/conf/ld.script +++ b/sys/arch/amd64/conf/ld.script @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.script,v 1.16 2020/02/19 16:55:04 kettenis Exp $ */ +/* $OpenBSD: ld.script,v 1.17 2021/03/07 23:10:54 mortimer Exp $ */ /* * Copyright (c) 2009 Tobias Weingartner <weingart@tepid.org> @@ -45,8 +45,8 @@ __kernel_virt_to_phys = __kernel_phys_base - __kernel_virt_base; ENTRY(start) SECTIONS { - .text (__kernel_virt_base + SIZEOF_HEADERS) : - AT (__kernel_phys_base + SIZEOF_HEADERS) + .text ALIGN(__kernel_virt_base + SIZEOF_HEADERS, __ALIGN_SIZE) : + AT (ALIGN(__kernel_phys_base + SIZEOF_HEADERS, __ALIGN_SIZE)) { start = .; locore0.o(.text) diff --git a/sys/arch/i386/conf/ld.script b/sys/arch/i386/conf/ld.script index 6afd7f3afa2..18d4a8a7ba0 100644 --- a/sys/arch/i386/conf/ld.script +++ b/sys/arch/i386/conf/ld.script @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.script,v 1.11 2019/11/09 20:07:00 guenther Exp $ */ +/* $OpenBSD: ld.script,v 1.12 2021/03/07 23:10:54 mortimer Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -46,7 +46,8 @@ SECTIONS { __kernel_text_virt = __kernel_base_virt; __kernel_text_phys = __kernel_base_phys; - .text (__kernel_text_virt) : AT (__kernel_text_phys) + .text ALIGN(__kernel_text_virt, __ALIGN_SIZE) : + AT (ALIGN(__kernel_text_phys, __ALIGN_SIZE)) { __text_start = ABSOLUTE(.) & 0xfffff000; __text_size = SIZEOF(.text); |