]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/conf/ldscript.mips.cfe
Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
[FreeBSD/FreeBSD.git] / sys / conf / ldscript.mips.cfe
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 /*
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.
39  */
40
41 ENTRY(_start)
42 SEARCH_DIR(/usr/lib);
43
44 PHDRS
45 {
46  headers PT_PHDR FILEHDR PHDRS ;
47  interp PT_INTERP ;
48  text PT_LOAD ;
49  dynamic PT_LOAD ;
50  data PT_LOAD ;
51 }
52
53 SECTIONS
54 {
55   /* Read-only sections, merged into text segment: */
56   . = KERNLOADADDR ;
57   .interp     : { *(.interp)    } :interp
58   .hash          : { *(.hash)           } :text
59   .dynsym        : { *(.dynsym)         }
60   .dynstr        : { *(.dynstr)         }
61   .gnu.version   : { *(.gnu.version)    }
62   .gnu.version_d   : { *(.gnu.version_d)        }
63   .gnu.version_r   : { *(.gnu.version_r)        }
64   .rel.init      : { *(.rel.init)       }
65   .rela.init     : { *(.rela.init)      }
66   .rel.text      :
67     {
68       *(.rel.text)
69       *(.rel.text.*)
70       *(.rel.gnu.linkonce.t.*)
71     }
72   .rela.text     :
73     {
74       *(.rela.text)
75       *(.rela.text.*)
76       *(.rela.gnu.linkonce.t.*)
77     }
78   .rel.fini      : { *(.rel.fini)       }
79   .rela.fini     : { *(.rela.fini)      }
80   .rel.rodata    :
81     {
82       *(.rel.rodata)
83       *(.rel.rodata.*)
84       *(.rel.gnu.linkonce.r.*)
85     }
86   .rela.rodata   :
87     {
88       *(.rela.rodata)
89       *(.rela.rodata.*)
90       *(.rela.gnu.linkonce.r.*)
91     }
92   .rel.data      :
93     {
94       *(.rel.data)
95       *(.rel.data.*)
96       *(.rel.gnu.linkonce.d.*)
97     }
98   .rela.data     :
99     {
100       *(.rela.data)
101       *(.rela.data.*)
102       *(.rela.gnu.linkonce.d.*)
103     }
104   .rel.ctors     : { *(.rel.ctors)      }
105   .rela.ctors    : { *(.rela.ctors)     }
106   .rel.dtors     : { *(.rel.dtors)      }
107   .rela.dtors    : { *(.rela.dtors)     }
108   .rel.got       : { *(.rel.got)                }
109   .rela.got      : { *(.rela.got)               }
110   .rel.sdata     :
111     {
112       *(.rel.sdata)
113       *(.rel.sdata.*)
114       *(.rel.gnu.linkonce.s.*)
115     }
116   .rela.sdata     :
117     {
118       *(.rela.sdata)
119       *(.rela.sdata.*)
120       *(.rela.gnu.linkonce.s.*)
121     }
122   .rel.sbss      :
123     { 
124       *(.rel.sbss)
125       *(.rel.sbss.*)
126       *(.rel.gnu.linkonce.sb.*)
127     }
128   .rela.sbss     :
129     {
130       *(.rela.sbss)
131       *(.rela.sbss.*)
132       *(.rel.gnu.linkonce.sb.*)
133     }
134   .rel.sdata2    : 
135     { 
136       *(.rel.sdata2)
137       *(.rel.sdata2.*)
138       *(.rel.gnu.linkonce.s2.*)
139     }
140   .rela.sdata2   : 
141     {
142       *(.rela.sdata2)
143       *(.rela.sdata2.*)
144       *(.rela.gnu.linkonce.s2.*)
145     }
146   .rel.sbss2     : 
147     { 
148       *(.rel.sbss2)     
149       *(.rel.sbss2.*)
150       *(.rel.gnu.linkonce.sb2.*)
151     }
152   .rela.sbss2    : 
153     { 
154       *(.rela.sbss2)    
155       *(.rela.sbss2.*)
156       *(.rela.gnu.linkonce.sb2.*)
157     }
158   .rel.bss       : 
159     { 
160       *(.rel.bss)
161       *(.rel.bss.*)
162       *(.rel.gnu.linkonce.b.*)
163     }
164   .rela.bss      : 
165     { 
166       *(.rela.bss)
167       *(.rela.bss.*)
168       *(.rela.gnu.linkonce.b.*)
169     }
170   .rel.plt       : { *(.rel.plt)                }
171   .rela.plt      : { *(.rela.plt)               }
172   .init          : 
173   { 
174     KEEP (*(.init))
175   } :text =0x1000000
176   .text      :
177   {
178     *(.trap)
179     *(.text)
180     *(.text.*)
181     *(.stub)
182     /* .gnu.warning sections are handled specially by elf32.em.  */
183     *(.gnu.warning)
184     *(.gnu.linkonce.t.*)
185   } =0x1000000
186   .fini      :
187   {
188     KEEP (*(.fini))
189   } =0x1000000
190   PROVIDE (__etext = .);
191   PROVIDE (_etext = .);
192   PROVIDE (etext = .);
193   .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
194   .rodata1   : { *(.rodata1) }
195   .note.gnu.build-id : {
196     PROVIDE (__build_id_start = .);
197     *(.note.gnu.build-id)
198     PROVIDE (__build_id_end = .);
199   }
200   .reginfo : { *(.reginfo) }
201   .sdata2   : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
202   .sbss2   : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
203   . = ALIGN(0x2000) + (. & (0x2000 - 1));
204   .data    :
205   {
206     *(.data)
207     *(.data.*)
208     *(.gnu.linkonce.d.*)
209   } :data
210   .data1   : { *(.data1) }
211   .eh_frame : { KEEP (*(.eh_frame)) }
212   .gcc_except_table : { *(.gcc_except_table) }
213   .ctors   : 
214   {
215     /* gcc uses crtbegin.o to find the start of
216        the constructors, so we make sure it is
217        first.  Because this is a wildcard, it
218        doesn't matter if the user does not
219        actually link against crtbegin.o; the
220        linker won't look for a file to match a
221        wildcard.  The wildcard also means that it
222        doesn't matter which directory crtbegin.o
223        is in.  */
224     KEEP (*crtbegin.o(.ctors))
225     /* We don't want to include the .ctor section from
226        from the crtend.o file until after the sorted ctors.
227        The .ctor section from the crtend file contains the
228        end of ctors marker and it must be last */
229     KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
230     KEEP (*(SORT(.ctors.*)))
231     KEEP (*(.ctors))
232   }
233    .dtors         :
234   {
235     KEEP (*crtbegin.o(.dtors))
236     KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
237     KEEP (*(SORT(.dtors.*)))
238     KEEP (*(.dtors))
239   }
240   .plt      : { *(.plt) }
241   _gp = ALIGN(16) + 0x7ff0;
242   .got            : { *(.got.plt) *(.got) }
243   .dynamic       : { *(.dynamic) } :dynamic
244   /* We want the small data sections together, so single-instruction offsets
245      can access them all, and initialized data all before uninitialized, so
246      we can shorten the on-disk segment size.  */
247   .sdata     : 
248   {
249     *(.sdata) 
250     *(.sdata.*)
251     *(.gnu.linkonce.s.*)
252   }
253   _edata = .;
254   PROVIDE (edata = .);
255   __bss_start = .;
256   .sbss      :
257   {
258     PROVIDE (__sbss_start = .);
259     PROVIDE (___sbss_start = .);
260     *(.dynsbss)
261     *(.sbss)
262     *(.sbss.*)
263     *(.gnu.linkonce.sb.*)
264     *(.scommon)
265     PROVIDE (__sbss_end = .);
266     PROVIDE (___sbss_end = .);
267   }
268   .bss       :
269   {
270    *(.dynbss)
271    *(.bss)
272    *(.bss.*)
273    *(.gnu.linkonce.b.*)
274    *(COMMON)
275    /* Align here to ensure that the .bss section occupies space up to
276       _end.  Align after .bss to ensure correct alignment even if the
277       .bss section disappears because there are no input sections.  */
278    . = ALIGN(64 / 8);
279   }
280   . = ALIGN(64 / 8);
281   _end = .;
282   PROVIDE (end = .);
283   /* Stabs debugging sections.  */
284   .stab 0 : { *(.stab) }
285   .stabstr 0 : { *(.stabstr) }
286   .stab.excl 0 : { *(.stab.excl) }
287   .stab.exclstr 0 : { *(.stab.exclstr) }
288   .stab.index 0 : { *(.stab.index) }
289   .stab.indexstr 0 : { *(.stab.indexstr) }
290   .comment 0 : { *(.comment) }
291   /* DWARF debug sections.
292      Symbols in the DWARF debugging sections are relative to the beginning
293      of the section so we begin them at 0.  */
294   /* DWARF 1 */
295   .debug          0 : { *(.debug) }
296   .line           0 : { *(.line) }
297   /* GNU DWARF 1 extensions */
298   .debug_srcinfo  0 : { *(.debug_srcinfo) }
299   .debug_sfnames  0 : { *(.debug_sfnames) }
300   /* DWARF 1.1 and DWARF 2 */
301   .debug_aranges  0 : { *(.debug_aranges) }
302   .debug_pubnames 0 : { *(.debug_pubnames) }
303   /* DWARF 2 */
304   .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
305   .debug_abbrev   0 : { *(.debug_abbrev) }
306   .debug_line     0 : { *(.debug_line) }
307   .debug_frame    0 : { *(.debug_frame) }
308   .debug_str      0 : { *(.debug_str) }
309   .debug_loc      0 : { *(.debug_loc) }
310   .debug_macinfo  0 : { *(.debug_macinfo) }
311   /* SGI/MIPS DWARF 2 extensions */
312   .debug_weaknames 0 : { *(.debug_weaknames) }
313   .debug_funcnames 0 : { *(.debug_funcnames) }
314   .debug_typenames 0 : { *(.debug_typenames) }
315   .debug_varnames  0 : { *(.debug_varnames) }
316   /* These must appear regardless of  .  */
317 }