2 * This linker script is needed to build a kernel for use by Broadcom CFE.
6 OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
10 /* Do we need any of these for elf?
12 PROVIDE (_DYNAMIC = 0);
14 DYNAMIC_LINK = 0; /* XXX */
17 /* Read-only sections, merged into text segment: */
25 /* .gnu.warning sections are handled specially by elf32.em. */
29 .interp : { *(.interp) }
31 .dynsym : { *(.dynsym) }
32 .dynstr : { *(.dynstr) }
33 .gnu.version : { *(.gnu.version) }
34 .gnu.version_d : { *(.gnu.version_d) }
35 .gnu.version_r : { *(.gnu.version_r) }
36 .rel.init : { *(.rel.init) }
37 .rela.init : { *(.rela.init) }
42 *(.rel.gnu.linkonce.t.*)
48 *(.rela.gnu.linkonce.t.*)
50 .rel.fini : { *(.rel.fini) }
51 .rela.fini : { *(.rela.fini) }
56 *(.rel.gnu.linkonce.r.*)
62 *(.rela.gnu.linkonce.r.*)
68 *(.rel.gnu.linkonce.d.*)
74 *(.rela.gnu.linkonce.d.*)
76 .rel.ctors : { *(.rel.ctors) }
77 .rela.ctors : { *(.rela.ctors) }
78 .rel.dtors : { *(.rel.dtors) }
79 .rela.dtors : { *(.rela.dtors) }
80 .rel.got : { *(.rel.got) }
81 .rela.got : { *(.rela.got) }
86 *(.rel.gnu.linkonce.s.*)
92 *(.rela.gnu.linkonce.s.*)
98 *(.rel.gnu.linkonce.sb.*)
104 *(.rel.gnu.linkonce.sb.*)
110 *(.rel.gnu.linkonce.s2.*)
116 *(.rela.gnu.linkonce.s2.*)
122 *(.rel.gnu.linkonce.sb2.*)
128 *(.rela.gnu.linkonce.sb2.*)
134 *(.rel.gnu.linkonce.b.*)
140 *(.rela.gnu.linkonce.b.*)
142 .rel.plt : { *(.rel.plt) }
143 .rela.plt : { *(.rela.plt) }
154 PROVIDE (__etext = .);
155 PROVIDE (_etext = .);
157 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
158 .rodata1 : { *(.rodata1) }
159 .reginfo : { *(.reginfo) }
160 .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
161 .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
162 . = ALIGN(0x2000) + (. & (0x2000 - 1));
170 .data1 : { *(.data1) }
171 .eh_frame : { KEEP (*(.eh_frame)) }
172 .gcc_except_table : { *(.gcc_except_table) }
175 /* gcc uses crtbegin.o to find the start of
176 the constructors, so we make sure it is
177 first. Because this is a wildcard, it
178 doesn't matter if the user does not
179 actually link against crtbegin.o; the
180 linker won't look for a file to match a
181 wildcard. The wildcard also means that it
182 doesn't matter which directory crtbegin.o
184 KEEP (*crtbegin.o(.ctors))
185 /* We don't want to include the .ctor section from
186 from the crtend.o file until after the sorted ctors.
187 The .ctor section from the crtend file contains the
188 end of ctors marker and it must be last */
189 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
190 KEEP (*(SORT(.ctors.*)))
195 KEEP (*crtbegin.o(.dtors))
196 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
197 KEEP (*(SORT(.dtors.*)))
201 _gp = ALIGN(16) + 0x7ff0;
202 .got : { *(.got.plt) *(.got) }
203 .dynamic : { *(.dynamic) }
204 /* We want the small data sections together, so single-instruction offsets
205 can access them all, and initialized data all before uninitialized, so
206 we can shorten the on-disk segment size. */
218 PROVIDE (__sbss_start = .);
219 PROVIDE (___sbss_start = .);
223 *(.gnu.linkonce.sb.*)
225 PROVIDE (__sbss_end = .);
226 PROVIDE (___sbss_end = .);
235 /* Align here to ensure that the .bss section occupies space up to
236 _end. Align after .bss to ensure correct alignment even if the
237 .bss section disappears because there are no input sections. */
243 /* Stabs debugging sections. */
244 .stab 0 : { *(.stab) }
245 .stabstr 0 : { *(.stabstr) }
246 .stab.excl 0 : { *(.stab.excl) }
247 .stab.exclstr 0 : { *(.stab.exclstr) }
248 .stab.index 0 : { *(.stab.index) }
249 .stab.indexstr 0 : { *(.stab.indexstr) }
250 .comment 0 : { *(.comment) }
251 /* DWARF debug sections.
252 Symbols in the DWARF debugging sections are relative to the beginning
253 of the section so we begin them at 0. */
255 .debug 0 : { *(.debug) }
256 .line 0 : { *(.line) }
257 /* GNU DWARF 1 extensions */
258 .debug_srcinfo 0 : { *(.debug_srcinfo) }
259 .debug_sfnames 0 : { *(.debug_sfnames) }
260 /* DWARF 1.1 and DWARF 2 */
261 .debug_aranges 0 : { *(.debug_aranges) }
262 .debug_pubnames 0 : { *(.debug_pubnames) }
264 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
265 .debug_abbrev 0 : { *(.debug_abbrev) }
266 .debug_line 0 : { *(.debug_line) }
267 .debug_frame 0 : { *(.debug_frame) }
268 .debug_str 0 : { *(.debug_str) }
269 .debug_loc 0 : { *(.debug_loc) }
270 .debug_macinfo 0 : { *(.debug_macinfo) }
271 /* SGI/MIPS DWARF 2 extensions */
272 .debug_weaknames 0 : { *(.debug_weaknames) }
273 .debug_funcnames 0 : { *(.debug_funcnames) }
274 .debug_typenames 0 : { *(.debug_typenames) }
275 .debug_varnames 0 : { *(.debug_varnames) }
276 /* These must appear regardless of . */