| @@ -1,67 +1,73 @@ | | | @@ -1,67 +1,73 @@ |
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 */ |
4 | OUTPUT_ARCH(powerpc) | | 4 | OUTPUT_ARCH(powerpc) |
5 | ENTRY(_start) | | 5 | ENTRY(_start) |
6 | SEARCH_DIR(/lib); | | 6 | SEARCH_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; |
10 | SECTIONS | | 10 | SECTIONS |
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 : |
15 | { | | 15 | { |
16 | _ftext = . ; | | 16 | _ftext = . ; |
17 | *(.text) | | 17 | *(.text) |
18 | __stub_start = .; | | 18 | __stub_start = .; |
19 | *(.stub) | | 19 | *(.stub) |
20 | __stub_end = .; | | 20 | __stub_end = .; |
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) |
47 | } | | 53 | } |
48 | _end = . ; | | 54 | _end = . ; |
49 | PROVIDE (end = .); | | 55 | PROVIDE (end = .); |
50 | /* These are needed for ELF backends which have not yet been | | 56 | /* These are needed for ELF backends which have not yet been |
51 | converted to the new style linker. */ | | 57 | converted to the new style linker. */ |
52 | .stab 0 : { *(.stab) } | | 58 | .stab 0 : { *(.stab) } |
53 | .stabstr 0 : { *(.stabstr) } | | 59 | .stabstr 0 : { *(.stabstr) } |
54 | /* DWARF debug sections. | | 60 | /* DWARF debug sections. |
55 | Symbols in the .debug DWARF section are relative to the beginning of the | | 61 | Symbols in the .debug DWARF section are relative to the beginning of the |
56 | section so we begin .debug at 0. It's not clear yet what needs to happen | | 62 | section so we begin .debug at 0. It's not clear yet what needs to happen |
57 | for the others. */ | | 63 | for the others. */ |
58 | .debug 0 : { *(.debug) } | | 64 | .debug 0 : { *(.debug) } |
59 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | | 65 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
60 | .debug_aranges 0 : { *(.debug_aranges) } | | 66 | .debug_aranges 0 : { *(.debug_aranges) } |
61 | .debug_pubnames 0 : { *(.debug_pubnames) } | | 67 | .debug_pubnames 0 : { *(.debug_pubnames) } |
62 | .debug_sfnames 0 : { *(.debug_sfnames) } | | 68 | .debug_sfnames 0 : { *(.debug_sfnames) } |
63 | .line 0 : { *(.line) } | | 69 | .line 0 : { *(.line) } |
64 | /* These must appear regardless of . */ | | 70 | /* These must appear regardless of . */ |
65 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } | | 71 | .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } |
66 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } | | 72 | .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } |
67 | } | | 73 | } |