1 /* $NetBSD: kern32.ldscript,v 1.7.14.1 2007/06/26 18:13:41 garbled Exp $ */
4 * Kernel linker script for NetBSD/sparc. This script is based on
5 * elf32_sparc.xn, but puts _etext after all of the read-only sections.
8 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
13 /* Do we need any of these for elf?
17 /* Read-only sections, merged into text segment: */
18 . = 0x10000 + SIZEOF_HEADERS;
19 .interp : { *(.interp) }
21 .dynsym : { *(.dynsym) }
22 .dynstr : { *(.dynstr) }
23 .gnu.version : { *(.gnu.version) }
24 .gnu.version_d : { *(.gnu.version_d) }
25 .gnu.version_r : { *(.gnu.version_r) }
27 { *(.rel.text) *(.rel.gnu.linkonce.t*) }
29 { *(.rela.text) *(.rela.gnu.linkonce.t*) }
31 { *(.rel.data) *(.rel.gnu.linkonce.d*) }
33 { *(.rela.data) *(.rela.gnu.linkonce.d*) }
35 { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
37 { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
38 .rel.got : { *(.rel.got) }
39 .rela.got : { *(.rela.got) }
40 .rel.ctors : { *(.rel.ctors) }
41 .rela.ctors : { *(.rela.ctors) }
42 .rel.dtors : { *(.rel.dtors) }
43 .rela.dtors : { *(.rela.dtors) }
44 .rel.init : { *(.rel.init) }
45 .rela.init : { *(.rela.init) }
46 .rel.fini : { *(.rel.fini) }
47 .rela.fini : { *(.rela.fini) }
48 .rel.bss : { *(.rel.bss) }
49 .rela.bss : { *(.rela.bss) }
50 .rel.plt : { *(.rel.plt) }
51 .rela.plt : { *(.rela.plt) }
52 .init : { *(.init) } =0
57 /* .gnu.warning sections are handled specially by elf32.em. */
61 .fini : { *(.fini) } =0
62 .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
63 .rodata1 : { *(.rodata1) }
66 /* Adjust the address for the data segment. We push the data segment
67 up to the next 4MB boundary so that we can map the text with large
70 kernel_data_start = .;
77 .data1 : { *(.data1) }
87 .got : { *(.got.plt) *(.got) }
88 .dynamic : { *(.dynamic) }
89 /* We want the small data sections together, so single-instruction offsets
90 can access them all, and initialized data all before uninitialized, so
91 we can shorten the on-disk segment size. */
92 .sdata : { *(.sdata) }
96 .sbss : { *(.sbss) *(.scommon) }
106 /* Stabs debugging sections. */
107 .stab 0 : { *(.stab) }
108 .stabstr 0 : { *(.stabstr) }
109 .stab.excl 0 : { *(.stab.excl) }
110 .stab.exclstr 0 : { *(.stab.exclstr) }
111 .stab.index 0 : { *(.stab.index) }
112 .stab.indexstr 0 : { *(.stab.indexstr) }
113 .comment 0 : { *(.comment) }
114 /* DWARF debug sections.
115 Symbols in the DWARF debugging sections are relative to the beginning
116 of the section so we begin them at 0. */
118 .debug 0 : { *(.debug) }
119 .line 0 : { *(.line) }
120 /* GNU DWARF 1 extensions */
121 .debug_srcinfo 0 : { *(.debug_srcinfo) }
122 .debug_sfnames 0 : { *(.debug_sfnames) }
123 /* DWARF 1.1 and DWARF 2 */
124 .debug_aranges 0 : { *(.debug_aranges) }
125 .debug_pubnames 0 : { *(.debug_pubnames) }
127 .debug_info 0 : { *(.debug_info) }
128 .debug_abbrev 0 : { *(.debug_abbrev) }
129 .debug_line 0 : { *(.debug_line) }
130 .debug_frame 0 : { *(.debug_frame) }
131 .debug_str 0 : { *(.debug_str) }
132 .debug_loc 0 : { *(.debug_loc) }
133 .debug_macinfo 0 : { *(.debug_macinfo) }
134 /* SGI/MIPS DWARF 2 extensions */
135 .debug_weaknames 0 : { *(.debug_weaknames) }
136 .debug_funcnames 0 : { *(.debug_funcnames) }
137 .debug_typenames 0 : { *(.debug_typenames) }
138 .debug_varnames 0 : { *(.debug_varnames) }
139 /* These must appear regardless of . */
142 KEEP(*(.note.netbsd.ident));