sync ldscripts; add cacheline_aligned and read_mostly handling to the non-default ones.diff -r1.8 -r1.9 src/sys/arch/i386/conf/kern.ldscript
(chs)
--- src/sys/arch/i386/conf/kern.ldscript 2010/06/01 22:13:30 1.8
+++ src/sys/arch/i386/conf/kern.ldscript 2012/09/23 01:01:17 1.9
@@ -1,68 +1,67 @@ | @@ -1,68 +1,67 @@ | |||
1 | /* $NetBSD: kern.ldscript,v 1.8 2010/06/01 22:13:30 mjf Exp $ */ | 1 | /* $NetBSD: kern.ldscript,v 1.9 2012/09/23 01:01:17 chs Exp $ */ | |
2 | 2 | |||
3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | 3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | |
4 | "elf32-i386") | 4 | "elf32-i386") | |
5 | OUTPUT_ARCH(i386) | 5 | OUTPUT_ARCH(i386) | |
6 | ENTRY(_start) | 6 | ENTRY(_start) | |
7 | SECTIONS | 7 | SECTIONS | |
8 | { | 8 | { | |
9 | /* Read-only sections, merged into text segment: */ | 9 | /* Read-only sections, merged into text segment: */ | |
10 | .text : | 10 | .text : | |
11 | AT (ADDR(.text) & 0x0fffffff) | 11 | AT (ADDR(.text) & 0x0fffffff) | |
12 | { | 12 | { | |
13 | *(.text) | 13 | *(.text) | |
14 | *(.text.*) | 14 | *(.text.*) | |
15 | *(.stub) | 15 | *(.stub) | |
16 | } =0 | 16 | } =0 | |
17 | _etext = . ; | 17 | _etext = . ; | |
18 | PROVIDE (etext = .) ; | 18 | PROVIDE (etext = .) ; | |
19 | 19 | |||
20 | .rodata : | 20 | .rodata : | |
21 | AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) | 21 | AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) | |
22 | { | 22 | { | |
23 | *(.rodata) | 23 | *(.rodata) | |
24 | *(.rodata.*) | 24 | *(.rodata.*) | |
25 | } | 25 | } | |
26 | 26 | |||
27 | /* Adjust the address for the data segment. We want to adjust up to | 27 | /* Adjust the address for the data segment. We want to adjust up to | |
28 | the same address within the page on the next page up. */ | 28 | the same address within the page on the next page up. */ | |
29 | . = ALIGN(0x1000) + (. & (0x1000 - 1)); | 29 | . = ALIGN(0x1000) + (. & (0x1000 - 1)); | |
30 | __data_start = . ; | 30 | __data_start = . ; | |
31 | .data : | 31 | .data : | |
32 | AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) | 32 | AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) | |
33 | { | 33 | { | |
34 | *(.data) | 34 | *(.data) | |
35 | } | 35 | } | |
36 | . = ALIGN(64); /* COHERENCY_UNIT */ | 36 | . = ALIGN(64); /* COHERENCY_UNIT */ | |
37 | .data.cacheline_aligned : | 37 | .data.cacheline_aligned : | |
38 | AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) | 38 | AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) | |
39 | { | 39 | { | |
40 | *(.data.cacheline_aligned) | 40 | *(.data.cacheline_aligned) | |
41 | } | 41 | } | |
42 | ||||
43 | . = ALIGN(64); /* COHERENCY_UNIT */ | 42 | . = ALIGN(64); /* COHERENCY_UNIT */ | |
44 | .data.read_mostly : | 43 | .data.read_mostly : | |
45 | AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) | 44 | AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) | |
46 | { | 45 | { | |
47 | *(.data.read_mostly) | 46 | *(.data.read_mostly) | |
48 | } | 47 | } | |
49 | . = ALIGN(64); /* COHERENCY_UNIT */ | 48 | . = ALIGN(64); /* COHERENCY_UNIT */ | |
50 | _edata = . ; | 49 | _edata = . ; | |
51 | PROVIDE (edata = .) ; | 50 | PROVIDE (edata = .) ; | |
52 | __bss_start = . ; | 51 | __bss_start = . ; | |
53 | .bss : | 52 | .bss : | |
54 | AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) | 53 | AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) | |
55 | { | 54 | { | |
56 | *(.bss) | 55 | *(.bss) | |
57 | *(.bss.*) | 56 | *(.bss.*) | |
58 | *(COMMON) | 57 | *(COMMON) | |
59 | . = ALIGN(32 / 8); | 58 | . = ALIGN(32 / 8); | |
60 | } | 59 | } | |
61 | . = ALIGN(32 / 8); | 60 | . = ALIGN(32 / 8); | |
62 | _end = . ; | 61 | _end = . ; | |
63 | PROVIDE (end = .) ; | 62 | PROVIDE (end = .) ; | |
64 | .note.netbsd.ident : | 63 | .note.netbsd.ident : | |
65 | { | 64 | { | |
66 | KEEP(*(.note.netbsd.ident)); | 65 | KEEP(*(.note.netbsd.ident)); | |
67 | } | 66 | } | |
68 | } | 67 | } |
--- src/sys/arch/i386/conf/Attic/kern.ldscript.4MB 2007/10/18 15:28:34 1.9
+++ src/sys/arch/i386/conf/Attic/kern.ldscript.4MB 2012/09/23 01:01:17 1.10
@@ -1,56 +1,68 @@ | @@ -1,56 +1,68 @@ | |||
1 | /* $NetBSD: kern.ldscript.4MB,v 1.9 2007/10/18 15:28:34 yamt Exp $ */ | 1 | /* $NetBSD: kern.ldscript.4MB,v 1.10 2012/09/23 01:01:17 chs Exp $ */ | |
2 | 2 | |||
3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | 3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | |
4 | "elf32-i386") | 4 | "elf32-i386") | |
5 | OUTPUT_ARCH(i386) | 5 | OUTPUT_ARCH(i386) | |
6 | ENTRY(_start) | 6 | ENTRY(_start) | |
7 | SECTIONS | 7 | SECTIONS | |
8 | { | 8 | { | |
9 | /* Read-only sections, merged into text segment: */ | 9 | /* Read-only sections, merged into text segment: */ | |
10 | .text : | 10 | .text : | |
11 | AT (ADDR(.text) & 0x0fffffff) | 11 | AT (ADDR(.text) & 0x0fffffff) | |
12 | { | 12 | { | |
13 | *(.text) | 13 | *(.text) | |
14 | *(.text.*) | 14 | *(.text.*) | |
15 | *(.stub) | 15 | *(.stub) | |
16 | } =0 | 16 | } =0 | |
17 | _etext = . ; | 17 | _etext = . ; | |
18 | PROVIDE (etext = .) ; | 18 | PROVIDE (etext = .) ; | |
19 | 19 | |||
20 | .rodata : | 20 | .rodata : | |
21 | AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) | 21 | AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) | |
22 | { | 22 | { | |
23 | *(.rodata) | 23 | *(.rodata) | |
24 | *(.rodata.*) | 24 | *(.rodata.*) | |
25 | } | 25 | } | |
26 | 26 | |||
27 | /* Adjust the address for the data segment. We push the data segment | 27 | /* Adjust the address for the data segment. We push the data segment | |
28 | up to the next 4MB boundary so that we can map the text with large | 28 | up to the next 4MB boundary so that we can map the text with large | |
29 | pages. */ | 29 | pages. */ | |
30 | . = ALIGN(0x400000); | 30 | . = ALIGN(0x400000); | |
31 | __data_start = . ; | 31 | __data_start = . ; | |
32 | .data : | 32 | .data : | |
33 | AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) | 33 | AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) | |
34 | { | 34 | { | |
35 | *(.data) | 35 | *(.data) | |
36 | *(.data.*) | |||
37 | } | 36 | } | |
37 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
38 | .data.cacheline_aligned : | |||
39 | AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) | |||
40 | { | |||
41 | *(.data.cacheline_aligned) | |||
42 | } | |||
43 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
44 | .data.read_mostly : | |||
45 | AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) | |||
46 | { | |||
47 | *(.data.read_mostly) | |||
48 | } | |||
49 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
38 | _edata = . ; | 50 | _edata = . ; | |
39 | PROVIDE (edata = .) ; | 51 | PROVIDE (edata = .) ; | |
40 | __bss_start = . ; | 52 | __bss_start = . ; | |
41 | .bss : | 53 | .bss : | |
42 | AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) | 54 | AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) | |
43 | { | 55 | { | |
44 | *(.bss) | 56 | *(.bss) | |
45 | *(.bss.*) | 57 | *(.bss.*) | |
46 | *(COMMON) | 58 | *(COMMON) | |
47 | . = ALIGN(32 / 8); | 59 | . = ALIGN(32 / 8); | |
48 | } | 60 | } | |
49 | . = ALIGN(32 / 8); | 61 | . = ALIGN(32 / 8); | |
50 | _end = . ; | 62 | _end = . ; | |
51 | PROVIDE (end = .) ; | 63 | PROVIDE (end = .) ; | |
52 | .note.netbsd.ident : | 64 | .note.netbsd.ident : | |
53 | { | 65 | { | |
54 | KEEP(*(.note.netbsd.ident)); | 66 | KEEP(*(.note.netbsd.ident)); | |
55 | } | 67 | } | |
56 | } | 68 | } |
--- src/sys/arch/i386/conf/kern.ldscript.Xen 2007/10/18 15:28:34 1.3
+++ src/sys/arch/i386/conf/kern.ldscript.Xen 2012/09/23 01:01:17 1.4
@@ -1,50 +1,62 @@ | @@ -1,50 +1,62 @@ | |||
1 | /* $NetBSD: kern.ldscript.Xen,v 1.3 2007/10/18 15:28:34 yamt Exp $ */ | 1 | /* $NetBSD: kern.ldscript.Xen,v 1.4 2012/09/23 01:01:17 chs Exp $ */ | |
2 | 2 | |||
3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | 3 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", | |
4 | "elf32-i386") | 4 | "elf32-i386") | |
5 | OUTPUT_ARCH(i386) | 5 | OUTPUT_ARCH(i386) | |
6 | SECTIONS | 6 | SECTIONS | |
7 | { | 7 | { | |
8 | /* Read-only sections, merged into text segment: */ | 8 | /* Read-only sections, merged into text segment: */ | |
9 | .text : | 9 | .text : | |
10 | { | 10 | { | |
11 | *(.text) | 11 | *(.text) | |
12 | *(.text.*) | 12 | *(.text.*) | |
13 | *(.stub) | 13 | *(.stub) | |
14 | } =0 | 14 | } =0 | |
15 | _etext = . ; | 15 | _etext = . ; | |
16 | PROVIDE (etext = .) ; | 16 | PROVIDE (etext = .) ; | |
17 | 17 | |||
18 | .rodata : | 18 | .rodata : | |
19 | { | 19 | { | |
20 | *(.rodata) | 20 | *(.rodata) | |
21 | *(.rodata.*) | 21 | *(.rodata.*) | |
22 | } | 22 | } | |
23 | 23 | |||
24 | /* Adjust the address for the data segment. We want to adjust up to | 24 | /* Adjust the address for the data segment. We want to adjust up to | |
25 | the same address within the page on the next page up. */ | 25 | the same address within the page on the next page up. */ | |
26 | . = ALIGN(0x1000) + (. & (0x1000 - 1)); | 26 | . = ALIGN(0x1000) + (. & (0x1000 - 1)); | |
27 | __data_start = . ; | 27 | __data_start = . ; | |
28 | .data : | 28 | .data : | |
29 | { | 29 | { | |
30 | *(.data) | 30 | *(.data) | |
31 | *(.data.*) | |||
32 | } | 31 | } | |
32 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
33 | .data.cacheline_aligned : | |||
34 | AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) | |||
35 | { | |||
36 | *(.data.cacheline_aligned) | |||
37 | } | |||
38 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
39 | .data.read_mostly : | |||
40 | AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) | |||
41 | { | |||
42 | *(.data.read_mostly) | |||
43 | } | |||
44 | . = ALIGN(64); /* COHERENCY_UNIT */ | |||
33 | _edata = . ; | 45 | _edata = . ; | |
34 | PROVIDE (edata = .) ; | 46 | PROVIDE (edata = .) ; | |
35 | __bss_start = . ; | 47 | __bss_start = . ; | |
36 | .bss : | 48 | .bss : | |
37 | { | 49 | { | |
38 | *(.bss) | 50 | *(.bss) | |
39 | *(.bss.*) | 51 | *(.bss.*) | |
40 | *(COMMON) | 52 | *(COMMON) | |
41 | . = ALIGN(32 / 8); | 53 | . = ALIGN(32 / 8); | |
42 | } | 54 | } | |
43 | . = ALIGN(32 / 8); | 55 | . = ALIGN(32 / 8); | |
44 | _end = . ; | 56 | _end = . ; | |
45 | PROVIDE (end = .) ; | 57 | PROVIDE (end = .) ; | |
46 | .note.netbsd.ident : | 58 | .note.netbsd.ident : | |
47 | { | 59 | { | |
48 | KEEP(*(.note.netbsd.ident)); | 60 | KEEP(*(.note.netbsd.ident)); | |
49 | } | 61 | } | |
50 | } | 62 | } |