Deleted Added
full compact
ldscript.mips.cfe (178693) ldscript.mips.cfe (183815)
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: head/sys/conf/ldscript.mips.cfe 183815 2008-10-13 06:07:58Z bms $
31 */
32
1/*
33/*
2 * This linker script is needed to build a kernel for use by Broadcom CFE.
34 * This linker script is needed to build a kernel for use by Broadcom CFE
35 * when loaded over TFTP; its ELF loader does not support backwards seek
36 * on network I/O streams.
37 * Furthermore, CFE will only load PT_LOAD segments, therefore the dynamic
38 * sections must be placed in their own segment.
3 */
4
39 */
40
5/* $FreeBSD: head/sys/conf/ldscript.mips.cfe 178693 2008-04-30 12:44:58Z gonzo $ */
6OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
41OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
42 "elf32-tradlittlemips")
43
7OUTPUT_ARCH(mips)
8ENTRY(_start)
9SEARCH_DIR(/usr/lib);
10/* Do we need any of these for elf?
11 __DYNAMIC = 0;
12PROVIDE (_DYNAMIC = 0);
13*/
44OUTPUT_ARCH(mips)
45ENTRY(_start)
46SEARCH_DIR(/usr/lib);
47/* Do we need any of these for elf?
48 __DYNAMIC = 0;
49PROVIDE (_DYNAMIC = 0);
50*/
14DYNAMIC_LINK = 0; /* XXX */
51
52PHDRS
53{
54 headers PT_PHDR FILEHDR PHDRS ;
55 interp PT_INTERP ;
56 text PT_LOAD ;
57 dynamic PT_LOAD ;
58 data PT_LOAD ;
59}
60
15SECTIONS
16{
17 /* Read-only sections, merged into text segment: */
61SECTIONS
62{
63 /* Read-only sections, merged into text segment: */
18 . = 0x80001000;
19 .text :
20 {
21 *(.trap)
22 *(.text)
23 *(.text.*)
24 *(.stub)
25 /* .gnu.warning sections are handled specially by elf32.em. */
26 *(.gnu.warning)
27 *(.gnu.linkonce.t.*)
28 }
29 .interp : { *(.interp) }
30 .hash : { *(.hash) }
64 . = 0x80100000 ;
65 .interp : { *(.interp) } :interp
66 .hash : { *(.hash) } :text
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) }
38 .rel.text :

--- 97 unchanged lines hidden (view full) ---

136 .rela.bss :
137 {
138 *(.rela.bss)
139 *(.rela.bss.*)
140 *(.rela.gnu.linkonce.b.*)
141 }
142 .rel.plt : { *(.rel.plt) }
143 .rela.plt : { *(.rela.plt) }
67 .dynsym : { *(.dynsym) }
68 .dynstr : { *(.dynstr) }
69 .gnu.version : { *(.gnu.version) }
70 .gnu.version_d : { *(.gnu.version_d) }
71 .gnu.version_r : { *(.gnu.version_r) }
72 .rel.init : { *(.rel.init) }
73 .rela.init : { *(.rela.init) }
74 .rel.text :

--- 97 unchanged lines hidden (view full) ---

172 .rela.bss :
173 {
174 *(.rela.bss)
175 *(.rela.bss.*)
176 *(.rela.gnu.linkonce.b.*)
177 }
178 .rel.plt : { *(.rel.plt) }
179 .rela.plt : { *(.rela.plt) }
144
145 .init :
146 {
147 KEEP (*(.init))
180 .init :
181 {
182 KEEP (*(.init))
148 }
149
183 } :text =0x1000000
184 .text :
185 {
186 *(.trap)
187 *(.text)
188 *(.text.*)
189 *(.stub)
190 /* .gnu.warning sections are handled specially by elf32.em. */
191 *(.gnu.warning)
192 *(.gnu.linkonce.t.*)
193 } =0x1000000
150 .fini :
151 {
152 KEEP (*(.fini))
153 } =0x1000000
154 PROVIDE (__etext = .);
155 PROVIDE (_etext = .);
156 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));
163 .data :
164 {
165 *(.data)
166 *(.data.*)
167 *(.gnu.linkonce.d.*)
168 SORT(CONSTRUCTORS)
194 .fini :
195 {
196 KEEP (*(.fini))
197 } =0x1000000
198 PROVIDE (__etext = .);
199 PROVIDE (_etext = .);
200 PROVIDE (etext = .);
201 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
202 .rodata1 : { *(.rodata1) }
203 .reginfo : { *(.reginfo) }
204 .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
205 .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
206 . = ALIGN(0x2000) + (. & (0x2000 - 1));
207 .data :
208 {
209 *(.data)
210 *(.data.*)
211 *(.gnu.linkonce.d.*)
212 SORT(CONSTRUCTORS)
169 }
213 } :data
170 .data1 : { *(.data1) }
171 .eh_frame : { KEEP (*(.eh_frame)) }
172 .gcc_except_table : { *(.gcc_except_table) }
173 .ctors :
174 {
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

--- 17 unchanged lines hidden (view full) ---

195 KEEP (*crtbegin.o(.dtors))
196 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
197 KEEP (*(SORT(.dtors.*)))
198 KEEP (*(.dtors))
199 }
200 .plt : { *(.plt) }
201 _gp = ALIGN(16) + 0x7ff0;
202 .got : { *(.got.plt) *(.got) }
214 .data1 : { *(.data1) }
215 .eh_frame : { KEEP (*(.eh_frame)) }
216 .gcc_except_table : { *(.gcc_except_table) }
217 .ctors :
218 {
219 /* gcc uses crtbegin.o to find the start of
220 the constructors, so we make sure it is
221 first. Because this is a wildcard, it

--- 17 unchanged lines hidden (view full) ---

239 KEEP (*crtbegin.o(.dtors))
240 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
241 KEEP (*(SORT(.dtors.*)))
242 KEEP (*(.dtors))
243 }
244 .plt : { *(.plt) }
245 _gp = ALIGN(16) + 0x7ff0;
246 .got : { *(.got.plt) *(.got) }
203 .dynamic : { *(.dynamic) }
247 .dynamic : { *(.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. */
207 .sdata :
208 {
209 *(.sdata)
210 *(.sdata.*)
211 *(.gnu.linkonce.s.*)

--- 66 unchanged lines hidden ---
248 /* We want the small data sections together, so single-instruction offsets
249 can access them all, and initialized data all before uninitialized, so
250 we can shorten the on-disk segment size. */
251 .sdata :
252 {
253 *(.sdata)
254 *(.sdata.*)
255 *(.gnu.linkonce.s.*)

--- 66 unchanged lines hidden ---