From 3b5965adb80e7d89defc2fa73ff83835c08f0d1f Mon Sep 17 00:00:00 2001 From: maxv Date: Sat, 14 May 2016 08:19:42 +0000 Subject: [PATCH] Align the segments on i386. We're going to map them independently. --- sys/arch/i386/conf/kern.ldscript | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/arch/i386/conf/kern.ldscript b/sys/arch/i386/conf/kern.ldscript index 8accbf5e3479..dd2f90634a5b 100644 --- a/sys/arch/i386/conf/kern.ldscript +++ b/sys/arch/i386/conf/kern.ldscript @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.18 2016/05/13 10:18:01 maxv Exp $ */ +/* $NetBSD: kern.ldscript,v 1.19 2016/05/14 08:19:42 maxv Exp $ */ #include "assym.h" @@ -16,11 +16,7 @@ SECTIONS _etext = . ; PROVIDE (etext = .) ; - /* - * Adjust the address for the rodata segment. We want to adjust up to - * the same address within the page on the next page up. - */ - . = ALIGN(0x1000) + (. & (0x1000 - 1)); + . = ALIGN(__PAGE_SIZE); __rodata_start = . ; .rodata : @@ -29,6 +25,8 @@ SECTIONS *(.rodata.*) } + . = ALIGN(__PAGE_SIZE); + __data_start = . ; .data : { @@ -55,7 +53,7 @@ SECTIONS *(.bss) *(.bss.*) *(COMMON) - . = ALIGN(32 / 8); + . = ALIGN(32 / 8); } . = ALIGN(__PAGE_SIZE);