source: rtems/bsps/mips/csb350/start/linkcmds @ ffa1153

5
Last change on this file since ffa1153 was ffa1153, checked in by Sebastian Huber <sebastian.huber@…>, on 12/14/19 at 20:36:09

bsps: Add RamEnd? to linker command files

Update #3838.

  • Property mode set to 100644
File size: 4.6 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;
17RamEnd = RamBase + RamSize;
18HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
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    _clear_end = .;
191    end = .;
192    _end = .;
193  } >ram
194
195  .rtemsstack (NOLOAD) : {
196    *(SORT(.rtemsstack.*))
197    WorkAreaBase = .;
198  } >ram
199
200/*
201** DWARF debug sections.
202** Symbols in the DWARF debugging sections are relative to
203** the beginning of the section so we begin them at 0. 
204*/
205
206  /* DWARF 1 */
207  .debug          0 : { *(.debug) }
208  .line           0 : { *(.line) }
209
210  /* GNU DWARF 1 extensions */
211  .debug_srcinfo  0 : { *(.debug_srcinfo) }
212  .debug_sfnames  0 : { *(.debug_sfnames) }
213
214  /* DWARF 1.1 and DWARF 2 */
215  .debug_aranges  0 : { *(.debug_aranges) }
216  .debug_pubnames 0 : { *(.debug_pubnames) }
217
218  /* DWARF 2 */
219  .debug_info     0 : { *(.debug_info) }   
220  .debug_abbrev   0 : { *(.debug_abbrev) } 
221  .debug_line     0 : { *(.debug_line) }   
222  .debug_frame    0 : { *(.debug_frame)}   
223  .debug_str      0 : { *(.debug_str) }     
224  .debug_loc      0 : { *(.debug_loc) }     
225  .debug_macinfo  0 : { *(.debug_macinfo) }
226
227  /* SGI/MIPS DWARF 2 extensions */
228  .debug_weaknames 0 : { *(.debug_weaknames) }
229  .debug_funcnames 0 : { *(.debug_funcnames) }
230  .debug_typenames 0 : { *(.debug_typenames) }
231  .debug_varnames  0 : { *(.debug_varnames) } 
232}
Note: See TracBrowser for help on using the repository browser.