Module Name: src
Committed By: maxv
Date: Mon May 16 07:52:31 UTC 2016
Modified Files:
src/sys/arch/i386/conf: kern.ldscript.4MB
Log Message:
Update kern.ldscript.4MB. It is the same as kern.ldscript, but with a large
page alignment before rodata.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/conf/kern.ldscript.4MB
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/conf/kern.ldscript.4MB
diff -u src/sys/arch/i386/conf/kern.ldscript.4MB:1.16 src/sys/arch/i386/conf/kern.ldscript.4MB:1.17
--- src/sys/arch/i386/conf/kern.ldscript.4MB:1.16 Tue Aug 25 12:56:58 2015
+++ src/sys/arch/i386/conf/kern.ldscript.4MB Mon May 16 07:52:31 2016
@@ -1,69 +1,88 @@
-/* $NetBSD: kern.ldscript.4MB,v 1.16 2015/08/25 12:56:58 uebayasi Exp $ */
+/* $NetBSD: kern.ldscript.4MB,v 1.17 2016/05/16 07:52:31 maxv Exp $ */
#include "assym.h"
+/*
+ * The large page size is 4MB in the non-PAE case.
+ */
+
+__PAGE_SIZE = 0x1000 ;
+__LARGE_PAGE_SIZE = 0x400000 ;
+
ENTRY(_start)
SECTIONS
{
- /* Read-only sections, merged into text segment: */
- .text :
- {
- *(.text)
- *(.text.*)
- *(.stub)
- }
- _etext = . ;
- PROVIDE (etext = .) ;
-
- .rodata :
- {
- *(.rodata)
- *(.rodata.*)
- }
-
- /* Adjust the address for the data segment. We push the data segment
- up to the next 4MB boundary so that we can map the text with large
- pages. */
- . = ALIGN(0x400000);
- __data_start = . ;
- .data :
- {
- *(.data)
- }
- . = ALIGN(COHERENCY_UNIT);
- .data.cacheline_aligned :
- {
- *(.data.cacheline_aligned)
- }
- . = ALIGN(COHERENCY_UNIT);
- .data.read_mostly :
- {
- *(.data.read_mostly)
- }
- . = ALIGN(COHERENCY_UNIT);
- _edata = . ;
- PROVIDE (edata = .) ;
- __bss_start = . ;
- .bss :
- {
- *(.bss)
- *(.bss.*)
- *(COMMON)
- . = ALIGN(32 / 8);
- }
- . = ALIGN(32 / 8);
- _end = . ;
- PROVIDE (end = .) ;
- .note.netbsd.ident :
- {
- KEEP(*(.note.netbsd.ident));
- }
+ .text :
+ {
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ }
+ _etext = . ;
+ PROVIDE (etext = .) ;
+
+ /*
+ * Push the rodata segment up to the next large page boundary so that we
+ * can map the text segment with large pages.
+ */
+ . = ALIGN(__LARGE_PAGE_SIZE);
+
+ __rodata_start = . ;
+ .rodata :
+ {
+ *(.rodata)
+ *(.rodata.*)
+ }
+
+ . = ALIGN(__PAGE_SIZE);
+
+ __data_start = . ;
+ .data :
+ {
+ *(.data)
+ }
+
+ . = ALIGN(COHERENCY_UNIT);
+ .data.cacheline_aligned :
+ {
+ *(.data.cacheline_aligned)
+ }
+ . = ALIGN(COHERENCY_UNIT);
+ .data.read_mostly :
+ {
+ *(.data.read_mostly)
+ }
+ . = ALIGN(COHERENCY_UNIT);
+
+ _edata = . ;
+ PROVIDE (edata = .) ;
+ __bss_start = . ;
+ .bss :
+ {
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(32 / 8);
+ }
+
+ . = ALIGN(__PAGE_SIZE);
+
+ /* End of the kernel image */
+ __kernel_end = . ;
+
+ _end = . ;
+ PROVIDE (end = .) ;
+ .note.netbsd.ident :
+ {
+ KEEP(*(.note.netbsd.ident));
+ }
}
+
SECTIONS
{
- .text :
- AT (ADDR(.text) & 0x0fffffff)
- {
- *(.text)
- } =0
+ .text :
+ AT (ADDR(.text) & 0x0fffffff)
+ {
+ *(.text)
+ } = 0
}