]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/mips/nlm/dev/net/ucore/ld.ucore.S
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / mips / nlm / dev / net / ucore / ld.ucore.S
1 /*-
2  * Copyright (c) 2003-2012 Broadcom Corporation
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  *
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in
13  *    the documentation and/or other materials provided with the
14  *    distribution.
15  * 
16  * THIS SOFTWARE IS PROVIDED BY BROADCOM ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * $FreeBSD$
29  */
30
31 ENTRY(_start)
32 OUTPUT_FORMAT(elf32-tradbigmips)
33 __DYNAMIC  =  0;
34
35 SECTIONS
36 {
37         . = 0x0;
38         _loadaddr = .   ;
39
40         /* ----------------------------------------- */
41
42         .text : {
43                 _ftext = . ;
44                 PROVIDE (eprol = .);
45                 _shim_reg = . ;
46                 *(.text)
47                 *(.text.*)
48                 *(.gnu.linkonce.t*)
49                 *(.mips16.fn.*)
50                 *(.mips16.call.*)
51         }
52         .init : {
53                 KEEP(*(.init))
54                 *(.init)
55         }
56         .fini : {
57                 *(.fini)
58         }
59         .rel.sdata : {
60                 PROVIDE (__runtime_reloc_start = .);
61                 *(.rel.sdata)
62                 PROVIDE (__runtime_reloc_stop = .);
63         }
64         PROVIDE (etext = .);
65         .ctors    :
66         {
67                 KEEP (*crtbegin.o(.ctors))
68                 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
69                 KEEP (*(SORT(.ctors.*)))
70                 KEEP (*(.ctors))
71         }
72         .dtors    :
73         {
74                 KEEP (*crtbegin.o(.dtors))
75                 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
76                 KEEP (*(SORT(.dtors.*)))
77                 KEEP (*(.dtors))
78         }
79         . = .;
80         .rodata : {
81                 *(.rdata)
82                 *(.rodata)
83                 *(.rodata.*)
84                 *(.gnu.linkonce.r*)
85         }
86         . = . + (0x1000 - .) ;
87
88         /* ----------------------------------------- */
89
90         . = 0x8000 ;
91         magicstart = . ;
92         .magicregs : {
93                 *(.magicregs)
94         }
95         magicend = . ;
96
97         /* ----------------------------------------- */
98
99         . = 0x18000 ;           
100         shmemstart = . ;
101         .sharedmem : {
102                 *(.sharedmem)
103         }
104         shmemend = . ;
105
106         /* ----------------------------------------- */
107
108         . = 0xFF800 ;
109         .data : {
110                 *(.data)
111                 *(.data.*)
112                 *(.gnu.linkonce.d*)
113         }
114         . = ALIGN(8);
115         .lit8 : {
116                 *(.lit8)
117         }
118         .lit4 : {
119                 *(.lit4)
120         }
121         .sdata : {
122                 *(.sdata)
123                 *(.sdata.*)
124                 *(.gnu.linkonce.s*)
125         }
126         . = ALIGN (8);
127         PROVIDE (edata  =  .);
128         _edata  =  .;
129         _fbss = .;
130         .sbss : {
131                 *(.sbss)
132                 *(.scommon)
133         }
134         .bss : {
135                 _bss_start = . ;
136                 *(.bss)
137                 *(COMMON)
138         }
139         _bss_end = . ;
140         _end = .;
141
142         _gp = . ;
143         __global = _gp ;
144         . = ALIGN (8);
145
146         PROVIDE(__stackmarker = .) ;
147
148         . = 0xFFA00 ;   
149
150         /* 32 + 4(argc) + 4(argv), aligned to 64 */
151         PROVIDE(__stack =  . - 64); 
152
153         /* ----------------------------------------- */
154
155         . = 0xFFE00 ;
156         .pktbuf : {
157                 *(.pktbuf)
158         }
159         . = . + (0x100000 - .) ;
160
161         PROVIDE(_endaddr = 0x0 + 0x100000);
162 }