1 /*-
2 * Copyright (c) 2001, 2004, 2008, Juniper Networks, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the Juniper Networks, Inc. nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY JUNIPER NETWORKS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL JUNIPER NETWORKS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * JNPR: ldscript.mips,v 1.3 2006/10/11 06:12:04
30 * $FreeBSD$
31 */
32
33 OUTPUT_ARCH(mips)
34 ENTRY(_start)
35 SEARCH_DIR(/usr/lib);
36 SECTIONS
37 {
38 /* Read-only sections, merged into text segment: */
39 . = KERNLOADADDR + SIZEOF_HEADERS;
40 .text :
41 {
42 *(.trap)
43 *(.text)
44 *(.text.*)
45 *(.stub)
46 /* .gnu.warning sections are handled specially by elf32.em. */
47 *(.gnu.warning)
48 *(.gnu.linkonce.t.*)
49 } =0x1000000
50 .fini :
51 {
52 KEEP (*(.fini))
53 } =0x1000000
54 PROVIDE (__etext = .);
55 PROVIDE (_etext = .);
56 PROVIDE (etext = .);
57 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
58 .rodata1 : { *(.rodata1) }
59 .interp : { *(.interp) }
60 .hash : { *(.hash) }
61 .dynsym : { *(.dynsym) }
62 .dynstr : { *(.dynstr) }
63 .gnu.version : { *(.gnu.version) }
64 .gnu.version_d : { *(.gnu.version_d) }
65 .gnu.version_r : { *(.gnu.version_r) }
66 .rel.init : { *(.rel.init) }
67 .rela.init : { *(.rela.init) }
68 .rel.text :
69 {
70 *(.rel.text)
71 *(.rel.text.*)
72 *(.rel.gnu.linkonce.t.*)
73 }
74 .rela.text :
75 {
76 *(.rela.text)
77 *(.rela.text.*)
78 *(.rela.gnu.linkonce.t.*)
79 }
80 .rel.fini : { *(.rel.fini) }
81 .rela.fini : { *(.rela.fini) }
82 .rel.rodata :
83 {
84 *(.rel.rodata)
85 *(.rel.rodata.*)
86 *(.rel.gnu.linkonce.r.*)
87 }
88 .rela.rodata :
89 {
90 *(.rela.rodata)
91 *(.rela.rodata.*)
92 *(.rela.gnu.linkonce.r.*)
93 }
94 .rel.data :
95 {
96 *(.rel.data)
97 *(.rel.data.*)
98 *(.rel.gnu.linkonce.d.*)
99 }
100 .rela.data :
101 {
102 *(.rela.data)
103 *(.rela.data.*)
104 *(.rela.gnu.linkonce.d.*)
105 }
106 .rel.ctors : { *(.rel.ctors) }
107 .rela.ctors : { *(.rela.ctors) }
108 .rel.dtors : { *(.rel.dtors) }
109 .rela.dtors : { *(.rela.dtors) }
110 .rel.got : { *(.rel.got) }
111 .rela.got : { *(.rela.got) }
112 .rel.sdata :
113 {
114 *(.rel.sdata)
115 *(.rel.sdata.*)
116 *(.rel.gnu.linkonce.s.*)
117 }
118 .rela.sdata :
119 {
120 *(.rela.sdata)
121 *(.rela.sdata.*)
122 *(.rela.gnu.linkonce.s.*)
123 }
124 .rel.sbss :
125 {
126 *(.rel.sbss)
127 *(.rel.sbss.*)
128 *(.rel.gnu.linkonce.sb.*)
129 }
130 .rela.sbss :
131 {
132 *(.rela.sbss)
133 *(.rela.sbss.*)
134 *(.rel.gnu.linkonce.sb.*)
135 }
136 .rel.sdata2 :
137 {
138 *(.rel.sdata2)
139 *(.rel.sdata2.*)
140 *(.rel.gnu.linkonce.s2.*)
141 }
142 .rela.sdata2 :
143 {
144 *(.rela.sdata2)
145 *(.rela.sdata2.*)
146 *(.rela.gnu.linkonce.s2.*)
147 }
148 .rel.sbss2 :
149 {
150 *(.rel.sbss2)
151 *(.rel.sbss2.*)
152 *(.rel.gnu.linkonce.sb2.*)
153 }
154 .rela.sbss2 :
155 {
156 *(.rela.sbss2)
157 *(.rela.sbss2.*)
158 *(.rela.gnu.linkonce.sb2.*)
159 }
160 .rel.bss :
161 {
162 *(.rel.bss)
163 *(.rel.bss.*)
164 *(.rel.gnu.linkonce.b.*)
165 }
166 .rela.bss :
167 {
168 *(.rela.bss)
169 *(.rela.bss.*)
170 *(.rela.gnu.linkonce.b.*)
171 }
172 .rel.plt : { *(.rel.plt) }
173 .rela.plt : { *(.rela.plt) }
174 .init :
175 {
176 KEEP (*(.init))
177 } =0x1000000
178 .reginfo : { *(.reginfo) }
179 .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
180 .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
181 . = ALIGN(0x2000) + (. & (0x2000 - 1));
182 .data :
183 {
184 *(.data)
185 *(.data.*)
186 *(.gnu.linkonce.d.*)
187 }
188 .data1 : { *(.data1) }
189 .eh_frame : { KEEP (*(.eh_frame)) }
190 .gcc_except_table : { *(.gcc_except_table) }
191 .ctors :
192 {
193 /* gcc uses crtbegin.o to find the start of
194 the constructors, so we make sure it is
195 first. Because this is a wildcard, it
196 doesn't matter if the user does not
197 actually link against crtbegin.o; the
198 linker won't look for a file to match a
199 wildcard. The wildcard also means that it
200 doesn't matter which directory crtbegin.o
201 is in. */
202 KEEP (*crtbegin.o(.ctors))
203 /* We don't want to include the .ctor section from
204 from the crtend.o file until after the sorted ctors.
205 The .ctor section from the crtend file contains the
206 end of ctors marker and it must be last */
207 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
208 KEEP (*(SORT(.ctors.*)))
209 KEEP (*(.ctors))
210 }
211 .dtors :
212 {
213 KEEP (*crtbegin.o(.dtors))
214 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
215 KEEP (*(SORT(.dtors.*)))
216 KEEP (*(.dtors))
217 }
218 .plt : { *(.plt) }
219 _gp = ALIGN(16) + 0x7ff0;
220 .got : { *(.got.plt) *(.got) }
221 .dynamic : { *(.dynamic) }
222 /* We want the small data sections together, so single-instruction offsets
223 can access them all, and initialized data all before uninitialized, so
224 we can shorten the on-disk segment size. */
225 .sdata :
226 {
227 *(.sdata)
228 *(.sdata.*)
229 *(.gnu.linkonce.s.*)
230 }
231 _edata = .;
232 PROVIDE (edata = .);
233 __bss_start = .;
234 .sbss :
235 {
236 PROVIDE (__sbss_start = .);
237 PROVIDE (___sbss_start = .);
238 *(.dynsbss)
239 *(.sbss)
240 *(.sbss.*)
241 *(.gnu.linkonce.sb.*)
242 *(.scommon)
243 PROVIDE (__sbss_end = .);
244 PROVIDE (___sbss_end = .);
245 }
246 .bss :
247 {
248 *(.dynbss)
249 *(.bss)
250 *(.bss.*)
251 *(.gnu.linkonce.b.*)
252 *(COMMON)
253 /* Align here to ensure that the .bss section occupies space up to
254 _end. Align after .bss to ensure correct alignment even if the
255 .bss section disappears because there are no input sections. */
256 . = ALIGN(64 / 8);
257 }
258 . = ALIGN(64 / 8);
259 _end = .;
260 PROVIDE (end = .);
261 /* Stabs debugging sections. */
262 .stab 0 : { *(.stab) }
263 .stabstr 0 : { *(.stabstr) }
264 .stab.excl 0 : { *(.stab.excl) }
265 .stab.exclstr 0 : { *(.stab.exclstr) }
266 .stab.index 0 : { *(.stab.index) }
267 .stab.indexstr 0 : { *(.stab.indexstr) }
268 .comment 0 : { *(.comment) }
269 /* DWARF debug sections.
270 Symbols in the DWARF debugging sections are relative to the beginning
271 of the section so we begin them at 0. */
272 /* DWARF 1 */
273 .debug 0 : { *(.debug) }
274 .line 0 : { *(.line) }
275 /* GNU DWARF 1 extensions */
276 .debug_srcinfo 0 : { *(.debug_srcinfo) }
277 .debug_sfnames 0 : { *(.debug_sfnames) }
278 /* DWARF 1.1 and DWARF 2 */
279 .debug_aranges 0 : { *(.debug_aranges) }
280 .debug_pubnames 0 : { *(.debug_pubnames) }
281 /* DWARF 2 */
282 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
283 .debug_abbrev 0 : { *(.debug_abbrev) }
284 .debug_line 0 : { *(.debug_line) }
285 .debug_frame 0 : { *(.debug_frame) }
286 .debug_str 0 : { *(.debug_str) }
287 .debug_loc 0 : { *(.debug_loc) }
288 .debug_macinfo 0 : { *(.debug_macinfo) }
289 /* SGI/MIPS DWARF 2 extensions */
290 .debug_weaknames 0 : { *(.debug_weaknames) }
291 .debug_funcnames 0 : { *(.debug_funcnames) }
292 .debug_typenames 0 : { *(.debug_typenames) }
293 .debug_varnames 0 : { *(.debug_varnames) }
294 /* These must appear regardless of . */
295 }
Cache object: 8a708a8f36512a65cd207f873e4c5b80
|