Sun Jan 23 17:38:37 2011 UTC ()
Add support for __read_mostly and __cacheline_aligned (using 32 bytes as
the cacheline as its the most prevalent sized used even though IBM970 has
a 128 byte cacheline).


(matt)
diff -r1.2 -r1.3 src/sys/arch/powerpc/conf/kern.ldscript

cvs diff -r1.2 -r1.3 src/sys/arch/powerpc/conf/kern.ldscript (expand / switch to unified diff)

--- src/sys/arch/powerpc/conf/kern.ldscript 2011/01/18 01:02:53 1.2
+++ src/sys/arch/powerpc/conf/kern.ldscript 2011/01/23 17:38:37 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern.ldscript,v 1.2 2011/01/18 01:02:53 matt Exp $ */ 1/* $NetBSD: kern.ldscript,v 1.3 2011/01/23 17:38:37 matt Exp $ */
2 2
3/* ldscript for NetBSD/powerpc kernels and LKMs */ 3/* ldscript for NetBSD/powerpc kernels and LKMs */
4OUTPUT_ARCH(powerpc) 4OUTPUT_ARCH(powerpc)
5ENTRY(_start) 5ENTRY(_start)
6SEARCH_DIR(/lib); 6SEARCH_DIR(/lib);
7/* Do we need any of these? 7/* Do we need any of these?
8 __DYNAMIC = 0; */ 8 __DYNAMIC = 0; */
9_DYNAMIC_LINK = 0; 9_DYNAMIC_LINK = 0;
10SECTIONS 10SECTIONS
11{ 11{
12 /* Read-only sections, merged into text segment. Assumes the 12 /* Read-only sections, merged into text segment. Assumes the
13 kernel Makefile sets the start address via -Ttext. */ 13 kernel Makefile sets the start address via -Ttext. */
14 .text : 14 .text :
@@ -21,26 +21,32 @@ SECTIONS @@ -21,26 +21,32 @@ SECTIONS
21 *(.gnu.warning) 21 *(.gnu.warning)
22 } =0 22 } =0
23 _etext = .; 23 _etext = .;
24 PROVIDE (etext = .); 24 PROVIDE (etext = .);
25 .rodata : { *(.rodata) *(.rodata.*) } 25 .rodata : { *(.rodata) *(.rodata.*) }
26 .reginfo : { *(.reginfo) } 26 .reginfo : { *(.reginfo) }
27/* . = . + 0x1000; */ 27/* . = . + 0x1000; */
28 .data : 28 .data :
29 { 29 {
30 _fdata = . ; 30 _fdata = . ;
31 *(.data) 31 *(.data)
32 CONSTRUCTORS 32 CONSTRUCTORS
33 } 33 }
 34 .data1 : { *(.data1) }
 35 . = ALIGN(32); /* COHERENCY UNIT */
 36 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
 37 . = ALIGN(32); /* COHERENCY UNIT */
 38 .data.read_mostly : { *(.data.read_mostly) }
 39 . = ALIGN(32); /* COHERENCY UNIT */
34 _gp = ALIGN(16) + 0x7ff0; 40 _gp = ALIGN(16) + 0x7ff0;
35 .lit8 : { *(.lit8) } 41 .lit8 : { *(.lit8) }
36 .lit4 : { *(.lit4) } 42 .lit4 : { *(.lit4) }
37 .sdata : { *(.sdata) } 43 .sdata : { *(.sdata) }
38 _edata = .; 44 _edata = .;
39 PROVIDE (edata = .); 45 PROVIDE (edata = .);
40 __bss_start = .; 46 __bss_start = .;
41 _fbss = .; 47 _fbss = .;
42 .sbss : { *(.sbss) *(.scommon) } 48 .sbss : { *(.sbss) *(.scommon) }
43 .bss : 49 .bss :
44 { 50 {
45 *(.bss) 51 *(.bss)
46 *(COMMON) 52 *(COMMON)