Align the segments on i386. We're going to map them independently.

This commit is contained in:
maxv 2016-05-14 08:19:42 +00:00
parent b8319f9aea
commit 3b5965adb8
1 changed files with 5 additions and 7 deletions

View File

@ -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" #include "assym.h"
@ -16,11 +16,7 @@ SECTIONS
_etext = . ; _etext = . ;
PROVIDE (etext = .) ; PROVIDE (etext = .) ;
/* . = ALIGN(__PAGE_SIZE);
* 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));
__rodata_start = . ; __rodata_start = . ;
.rodata : .rodata :
@ -29,6 +25,8 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
} }
. = ALIGN(__PAGE_SIZE);
__data_start = . ; __data_start = . ;
.data : .data :
{ {
@ -55,7 +53,7 @@ SECTIONS
*(.bss) *(.bss)
*(.bss.*) *(.bss.*)
*(COMMON) *(COMMON)
. = ALIGN(32 / 8); . = ALIGN(32 / 8);
} }
. = ALIGN(__PAGE_SIZE); . = ALIGN(__PAGE_SIZE);