source: rtems/c/src/lib/libbsp/mips/csb350/startup/linkcmds @ e46b1b4

5
Last change on this file since e46b1b4 was e46b1b4, checked in by Joel Sherrill <joel@…>, on 12/18/17 at 22:51:53

csb350: Simplify bsp_specs

Updates #3250.

  • Property mode set to 100644
File size: 4.7 KB
Line 
1/*
2 *  Linker script for CSB350 AU1100 based board
3 */
4
5/*    . = 0x80020000; */
6
7/*
8 * Declare some sizes.
9 */
10
11_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x80400000;
12_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 12M;
13
14/* standard items provided by RTEMS linkcmds files */
15RamBase = _sdram_base;
16RamSize = _sdram_size;
17HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
18_StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000;
19
20ENTRY(_start)
21STARTUP(start.o)
22
23MEMORY
24{
25   ram      : ORIGIN = 0x80400000, LENGTH = 12M
26}
27
28SECTIONS
29{
30    .text :
31    {
32       _ftext = . ;
33
34      */start.o(.text)
35
36      *(.text*)
37      *(.gnu.linkonce.t*)
38      *(.mips16.fn.*)
39      *(.mips16.call.*)
40      *(.reginfo*)
41      PROVIDE (__runtime_reloc_start = .);
42      *(.rel.sdata)
43      *(.rel.dyn)
44      PROVIDE (__runtime_reloc_stop = .);
45
46      /*
47       * Special FreeBSD sysctl sections.
48       */
49      . = ALIGN (16);
50      __start_set_sysctl_set = .;
51      *(set_sysctl_*);
52      __stop_set_sysctl_set = ABSOLUTE(.);
53      *(set_domain_*);
54      *(set_pseudo_*);
55
56      *(.gcc_except_table*)
57      *(.eh_frame_hdr)
58      *(.eh_frame)
59    } >ram 
60
61  .init :
62  {
63     KEEP(*(.init))
64
65  } > ram
66
67  .fini :
68  {
69     KEEP(*(.fini))
70
71  }  >ram
72
73
74  .ctors    :
75  {
76    /* gcc uses crtbegin.o to find the start of
77       the constructors, so we make sure it is
78       first.  Because this is a wildcard, it
79       doesn't matter if the user does not
80       actually link against crtbegin.o; the
81       linker won't look for a file to match a
82       wildcard.  The wildcard also means that it
83       doesn't matter which directory crtbegin.o
84       is in.  */
85
86    KEEP (*crtbegin.o(.ctors))
87
88    /* We don't want to include the .ctor section from
89       from the crtend.o file until after the sorted ctors.
90       The .ctor section from the crtend file contains the
91       end of ctors marker and it must be last */
92
93    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
94    KEEP (*(SORT(.ctors.*)))
95    KEEP (*(.ctors))
96  } >ram 
97
98  .dtors    :
99  {
100    KEEP (*crtbegin.o(.dtors))
101    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
102    KEEP (*(SORT(.dtors.*)))
103    KEEP (*(.dtors))
104
105    etext  =  .;
106    _etext  =  .;
107  } >ram 
108
109
110
111  .rdata :
112  {
113    *(.rdata)
114    *(.rodata)
115    *(.rodata.*)
116    KEEP (*(SORT(.rtemsroset.*)))
117    *(.gnu.linkonce.r*)
118  } >ram 
119
120  .tdata : {
121    _TLS_Data_begin = .;
122    *(.tdata .tdata.* .gnu.linkonce.td.*)
123    _TLS_Data_end = .;
124  } >ram
125
126  .tbss : {
127    _TLS_BSS_begin = .;
128    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
129    _TLS_BSS_end = .;
130  } >ram
131
132  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
133  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
134  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
135  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
136  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
137  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
138
139  .data :
140  {
141    _fdata = ALIGN(16);
142
143    *(.data)
144    *(.data.*)
145    KEEP (*(SORT(.rtemsrwset.*)))
146    *(.gnu.linkonce.d*)
147  } >ram 
148
149  .jcr :
150  {
151    . = ALIGN(8);
152    KEEP (*(.jcr))
153
154    _gp = ALIGN(16) + 0x7440;
155    __global = _gp;
156  } >ram
157
158  .lit8 :
159  {
160    *(.lit8)
161  } >ram 
162
163  .lit4 :
164  {
165    *(.lit4)
166  } >ram   
167
168  .sdata :   
169  {
170    *(.sdata*)
171    *(.gnu.linkonce.s*)
172  } >ram 
173
174  .sbss :
175  {
176   edata  =  .;
177   _edata  =  .;
178   _fbss = .;
179    *(.sbss*)
180    *(.scommon)
181  } >ram   
182
183
184  .bss :
185  {
186    _bss_start = . ;
187    *(.bss .bss.* .gnu.linkonce.b.*)
188    *(COMMON)
189    . = ALIGN (64);
190    _stack_limit = .;
191    . += _StackSize;
192    __stack = .;
193    _stack_init = .;
194    _clear_end = .;
195    end = .;
196    _end = .;
197    . = ALIGN (1024);
198    WorkAreaBase = .;
199   
200  } >ram   
201
202
203/*
204** DWARF debug sections.
205** Symbols in the DWARF debugging sections are relative to
206** the beginning of the section so we begin them at 0. 
207*/
208
209  /* DWARF 1 */
210  .debug          0 : { *(.debug) }
211  .line           0 : { *(.line) }
212
213  /* GNU DWARF 1 extensions */
214  .debug_srcinfo  0 : { *(.debug_srcinfo) }
215  .debug_sfnames  0 : { *(.debug_sfnames) }
216
217  /* DWARF 1.1 and DWARF 2 */
218  .debug_aranges  0 : { *(.debug_aranges) }
219  .debug_pubnames 0 : { *(.debug_pubnames) }
220
221  /* DWARF 2 */
222  .debug_info     0 : { *(.debug_info) }   
223  .debug_abbrev   0 : { *(.debug_abbrev) } 
224  .debug_line     0 : { *(.debug_line) }   
225  .debug_frame    0 : { *(.debug_frame)}   
226  .debug_str      0 : { *(.debug_str) }     
227  .debug_loc      0 : { *(.debug_loc) }     
228  .debug_macinfo  0 : { *(.debug_macinfo) }
229
230  /* SGI/MIPS DWARF 2 extensions */
231  .debug_weaknames 0 : { *(.debug_weaknames) }
232  .debug_funcnames 0 : { *(.debug_funcnames) }
233  .debug_typenames 0 : { *(.debug_typenames) }
234  .debug_varnames  0 : { *(.debug_varnames) } 
235}
Note: See TracBrowser for help on using the repository browser.