Mon May 16 07:52:31 2016 UTC ()
Update kern.ldscript.4MB. It is the same as kern.ldscript, but with a large
page alignment before rodata.


(maxv)
diff -r1.16 -r1.17 src/sys/arch/i386/conf/kern.ldscript.4MB

cvs diff -r1.16 -r1.17 src/sys/arch/i386/conf/Attic/kern.ldscript.4MB (expand / switch to unified diff)

--- src/sys/arch/i386/conf/Attic/kern.ldscript.4MB 2015/08/25 12:56:58 1.16
+++ src/sys/arch/i386/conf/Attic/kern.ldscript.4MB 2016/05/16 07:52:31 1.17
@@ -1,69 +1,88 @@ @@ -1,69 +1,88 @@
1/* $NetBSD: kern.ldscript.4MB,v 1.16 2015/08/25 12:56:58 uebayasi Exp $ */ 1/* $NetBSD: kern.ldscript.4MB,v 1.17 2016/05/16 07:52:31 maxv Exp $ */
2 2
3#include "assym.h" 3#include "assym.h"
4 4
 5/*
 6 * The large page size is 4MB in the non-PAE case.
 7 */
 8
 9__PAGE_SIZE = 0x1000 ;
 10__LARGE_PAGE_SIZE = 0x400000 ;
 11
5ENTRY(_start) 12ENTRY(_start)
6SECTIONS 13SECTIONS
7{ 14{
8 /* Read-only sections, merged into text segment: */ 15 .text :
9 .text : 16 {
10 { 17 *(.text)
11 *(.text) 18 *(.text.*)
12 *(.text.*) 19 *(.stub)
13 *(.stub) 20 }
14 } 21 _etext = . ;
15 _etext = . ; 22 PROVIDE (etext = .) ;
16 PROVIDE (etext = .) ; 23
17 24 /*
18 .rodata : 25 * Push the rodata segment up to the next large page boundary so that we
19 { 26 * can map the text segment with large pages.
20 *(.rodata) 27 */
21 *(.rodata.*) 28 . = ALIGN(__LARGE_PAGE_SIZE);
22 } 29
23 30 __rodata_start = . ;
24 /* Adjust the address for the data segment. We push the data segment 31 .rodata :
25 up to the next 4MB boundary so that we can map the text with large 32 {
26 pages. */ 33 *(.rodata)
27 . = ALIGN(0x400000); 34 *(.rodata.*)
28 __data_start = . ; 35 }
29 .data : 36
30 { 37 . = ALIGN(__PAGE_SIZE);
31 *(.data) 38
32 } 39 __data_start = . ;
33 . = ALIGN(COHERENCY_UNIT); 40 .data :
34 .data.cacheline_aligned : 41 {
35 { 42 *(.data)
36 *(.data.cacheline_aligned) 43 }
37 } 44
38 . = ALIGN(COHERENCY_UNIT); 45 . = ALIGN(COHERENCY_UNIT);
39 .data.read_mostly : 46 .data.cacheline_aligned :
40 { 47 {
41 *(.data.read_mostly) 48 *(.data.cacheline_aligned)
42 } 49 }
43 . = ALIGN(COHERENCY_UNIT); 50 . = ALIGN(COHERENCY_UNIT);
44 _edata = . ; 51 .data.read_mostly :
45 PROVIDE (edata = .) ; 52 {
46 __bss_start = . ; 53 *(.data.read_mostly)
47 .bss : 54 }
48 { 55 . = ALIGN(COHERENCY_UNIT);
49 *(.bss) 56
50 *(.bss.*) 57 _edata = . ;
51 *(COMMON) 58 PROVIDE (edata = .) ;
52 . = ALIGN(32 / 8); 59 __bss_start = . ;
53 } 60 .bss :
54 . = ALIGN(32 / 8); 61 {
55 _end = . ; 62 *(.bss)
56 PROVIDE (end = .) ; 63 *(.bss.*)
57 .note.netbsd.ident : 64 *(COMMON)
58 { 65 . = ALIGN(32 / 8);
59 KEEP(*(.note.netbsd.ident)); 66 }
60 } 67
 68 . = ALIGN(__PAGE_SIZE);
 69
 70 /* End of the kernel image */
 71 __kernel_end = . ;
 72
 73 _end = . ;
 74 PROVIDE (end = .) ;
 75 .note.netbsd.ident :
 76 {
 77 KEEP(*(.note.netbsd.ident));
 78 }
61} 79}
 80
62SECTIONS 81SECTIONS
63{ 82{
64 .text : 83 .text :
65 AT (ADDR(.text) & 0x0fffffff) 84 AT (ADDR(.text) & 0x0fffffff)
66 { 85 {
67 *(.text) 86 *(.text)
68 } =0 87 } = 0
69} 88}