source: rtems/c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds @ 44d18b9

5
Last change on this file since 44d18b9 was 44d18b9, checked in by Sebastian Huber <sebastian.huber@…>, on 12/09/15 at 13:03:09

bsps: Fix some linker set descriptions

Fix broken RTEMS linker set descriptions introduced by
b618d8cfc54f84d4ed03dc7b7fa510c872e6128a.

  • Property mode set to 100644
File size: 11.0 KB
Line 
1/* generated.x
2 *
3 * Machine generated for a CPU named "cpu_0" as defined in:
4 * D:\eb2_nios2\kawkos.ptf
5 *
6 * Generated: 2005-07-10 11:52:46.899
7 *
8 */
9
10/*
11
12DO NOT MODIFY THIS FILE
13
14   Changing this file will have subtle consequences
15   which will almost certainly lead to a nonfunctioning
16   system. If you do modify this file, be aware that your
17   changes will be overwritten and lost when this file
18   is generated again.
19
20DO NOT MODIFY THIS FILE
21
22*/
23
24RamBase = DEFINED(RamBase) ? RamBase : 0x00000000;
25RamSize = DEFINED(RamSize) ? RamSize : 0x00800000;
26HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
27StackSize = DEFINED(StackSize) ? HeapSize : 1024;
28
29MEMORY
30{
31    reset : ORIGIN = 0x00000000, LENGTH = 0x00000600
32    exceptions : ORIGIN = 0x00000600, LENGTH = 0x00000A00
33    onchip_memory_0 : ORIGIN = 0x00001000, LENGTH = 0x007FF000
34}
35
36    /* Define symbols for each memory base-address */
37 __alt_mem_onchip_memory_0 = 0x00000000 ;
38
39 __nios2_icache_size = 4096 ;
40 __nios2_icache_line_size = 32 ;
41 __nios2_dcache_size = 0 ;
42 __nios2_dcache_line_size = 4 ;
43
44OUTPUT_FORMAT( "elf32-littlenios2",
45               "elf32-littlenios2",
46               "elf32-littlenios2" )
47OUTPUT_ARCH( nios2 )
48ENTRY( _start )
49
50/* Do we need any of these for elf?
51   __DYNAMIC = 0;
52 */
53
54SECTIONS
55{
56    .entry :
57    {
58        KEEP (*(.entry))
59    } > reset
60
61    .exceptions :
62    {
63        PROVIDE (__ram_exceptions_start = ABSOLUTE(.));
64        . = ALIGN(0x20);
65        *(.irq)
66        KEEP (*(.exceptions.entry.label));
67        KEEP (*(.exceptions.entry.user));
68        KEEP (*(.exceptions.entry));
69        KEEP (*(.exceptions.irqtest.user));
70        KEEP (*(.exceptions.irqtest));
71        KEEP (*(.exceptions.irqhandler.user));
72        KEEP (*(.exceptions.irqhandler));
73        KEEP (*(.exceptions.irqreturn.user));
74        KEEP (*(.exceptions.irqreturn));
75        KEEP (*(.exceptions.notirq.label));
76        KEEP (*(.exceptions.notirq.user));
77        KEEP (*(.exceptions.notirq));
78        KEEP (*(.exceptions.soft.user));
79        KEEP (*(.exceptions.soft));
80        KEEP (*(.exceptions.unknown.user));
81        KEEP (*(.exceptions.unknown));
82        KEEP (*(.exceptions.exit.label));
83        KEEP (*(.exceptions.exit.user));
84        KEEP (*(.exceptions.exit));
85        KEEP (*(.exceptions));
86        PROVIDE (__ram_exceptions_end = ABSOLUTE(.));
87    } > exceptions
88
89    PROVIDE (__flash_exceptions_start = LOADADDR(.exceptions));
90
91    .text :
92    {
93        /*
94         * All code sections are merged into the text output section, along with
95         * the read only data sections.
96         *
97         */
98
99        PROVIDE (stext = ABSOLUTE(.));
100
101        *(.interp)
102        *(.hash)
103        *(.dynsym)
104        *(.dynstr)
105        *(.gnu.version)
106        *(.gnu.version_d)
107        *(.gnu.version_r)
108        *(.rel.init)
109        *(.rela.init)
110        *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
111        *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
112        *(.rel.fini)
113        *(.rela.fini)
114        *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
115        *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
116        *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
117        *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
118        *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
119        *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
120        *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
121        *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
122        *(.rel.ctors)
123        *(.rela.ctors)
124        *(.rel.dtors)
125        *(.rela.dtors)
126        *(.rel.got)
127        *(.rela.got)
128        *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
129        *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
130        *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
131        *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
132        *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
133        *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
134        *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
135        *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
136        *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
137        *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
138        *(.rel.plt)
139        *(.rela.plt)
140
141        KEEP (*(.init))
142        *(.plt)
143        *(.text .stub .text.* .gnu.linkonce.t.*)
144
145        /* Special FreeBSD sysctl sections.  */
146        . = ALIGN (16);
147        __start_set_sysctl_set = .;
148        *(set_sysctl_*);
149        __stop_set_sysctl_set = ABSOLUTE(.);
150        *(set_domain_*);
151        *(set_pseudo_*);
152
153/* .gnu.warning sections are handled specially by elf32.em.  */
154
155        *(.gnu.warning.*)
156        KEEP (*(.fini))
157        PROVIDE (__etext = ABSOLUTE(.));
158        PROVIDE (_etext = ABSOLUTE(.));
159        PROVIDE (etext = ABSOLUTE(.));
160
161        *(.eh_frame_hdr)
162        /* Ensure the __preinit_array_start label is properly aligned.  We
163           could instead move the label definition inside the section, but
164           the linker would then create the section even if it turns out to
165           be empty, which isn't pretty.  */
166        . = ALIGN(32 / 8);
167        PROVIDE (__preinit_array_start = ABSOLUTE(.));
168        *(.preinit_array)
169        PROVIDE (__preinit_array_end = ABSOLUTE(.));
170        PROVIDE (__init_array_start = ABSOLUTE(.));
171        *(.init_array)
172        PROVIDE (__init_array_end = ABSOLUTE(.));
173        PROVIDE (__fini_array_start = ABSOLUTE(.));
174        *(.fini_array)
175        PROVIDE (__fini_array_end = ABSOLUTE(.));
176        SORT(CONSTRUCTORS)
177        KEEP (*(.eh_frame))
178        *(.gcc_except_table*)
179        *(.dynamic)
180        PROVIDE (__CTOR_LIST__ = ABSOLUTE(.));
181        KEEP (*(.ctors))
182        KEEP (*(SORT(.ctors.*)))
183        PROVIDE (__CTOR_END__ = ABSOLUTE(.));
184        PROVIDE (__DTOR_LIST__ = ABSOLUTE(.));
185        KEEP (*(.dtors))
186        KEEP (*(SORT(.dtors.*)))
187        PROVIDE (__DTOR_END__ = ABSOLUTE(.));
188        KEEP (*(.jcr))
189        . = ALIGN(32 / 8);
190    } >  onchip_memory_0 = 0x3a880100 /* NOP on Nios2 (big endian) */
191
192    .rodata :
193    {
194        PROVIDE (__ram_rodata_start = ABSOLUTE(.));
195        . = ALIGN(32 / 8);
196        *(.rodata .rodata.* .gnu.linkonce.r.*)
197        *(.rodata1)
198        KEEP (*(SORT(.rtemsroset.*)))
199    } > onchip_memory_0
200
201    .tdata : {
202        _TLS_Data_begin = .;
203        *(.tdata .tdata.* .gnu.linkonce.td.*)
204        _TLS_Data_end = .;
205    } > onchip_memory_0
206
207    .tbss : {
208        _TLS_BSS_begin = .;
209        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
210        _TLS_BSS_end = .;
211        . = ALIGN(32 / 8);
212        PROVIDE (__ram_rodata_end = ABSOLUTE(.));
213    } > onchip_memory_0
214
215    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
216    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
217    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
218    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
219    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
220    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
221
222    PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
223
224    .rwdata  :
225    {
226        PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
227        . = ALIGN(32 / 8);
228        *(.got.plt) *(.got)
229        *(.data1)
230        *(.data .data.* .gnu.linkonce.d.*)
231        KEEP (*(SORT(.rtemsrwset.*)))
232
233        _gp = ABSOLUTE(. + 0x8000);
234        PROVIDE(gp = _gp);
235
236        *(.sdata .sdata.* .gnu.linkonce.s.*)
237        *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
238
239        . = ALIGN(32 / 8);
240        _edata = ABSOLUTE(.);
241        PROVIDE (edata = ABSOLUTE(.));
242        PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
243    } > onchip_memory_0
244
245    PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata));
246
247    .bss :
248    {
249        __bss_start = ABSOLUTE(.);
250        PROVIDE (__sbss_start = ABSOLUTE(.));
251        PROVIDE (___sbss_start = ABSOLUTE(.));
252
253        *(.dynsbss)
254        *(.sbss .sbss.* .gnu.linkonce.sb.*)
255        *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
256        *(.scommon)
257
258        PROVIDE (__sbss_end = ABSOLUTE(.));
259        PROVIDE (___sbss_end = ABSOLUTE(.));
260
261        *(.dynbss)
262        *(.bss .bss.* .gnu.linkonce.b.*)
263        *(COMMON)
264
265        . = ALIGN(32 / 8);
266        __bss_end = ABSOLUTE(.);
267        _stack_low = ABSOLUTE(.);
268        . += StackSize;
269        _stack_high = ABSOLUTE(.);
270        WorkAreaBase = .;
271    } > onchip_memory_0
272
273    /*
274     * One output section for each of the available partitions. These are not
275     * used by default, but can be used by users applications using the .section
276     * directive.
277     *
278     * The memory partition used for the heap is treated in  special way, i.e. a
279     * symbol is added to point to the heap start.
280     *
281     * Note that when running from flash, these sections are not loaded by the
282     * HAL.
283     *
284     */
285
286    .onchip_memory_0 :
287    {
288        PROVIDE (_alt_partition_onchip_memory_0_start = ABSOLUTE(.));
289        *(.onchip_memory_0 .onchip_memory_0.*)
290        . = ALIGN(32 / 8);
291        PROVIDE (_alt_partition_onchip_memory_0_end = ABSOLUTE(.));
292        _end = ABSOLUTE(.);
293        end = ABSOLUTE(.);
294
295    } > onchip_memory_0
296
297    PROVIDE (_alt_partition_onchip_memory_0_load_addr = LOADADDR(.onchip_memory_0));
298
299    /*
300     * Stabs debugging sections.
301     *
302     */
303
304    .stab          0 : { *(.stab) }
305    .stabstr       0 : { *(.stabstr) }
306    .stab.excl     0 : { *(.stab.excl) }
307    .stab.exclstr  0 : { *(.stab.exclstr) }
308    .stab.index    0 : { *(.stab.index) }
309    .stab.indexstr 0 : { *(.stab.indexstr) }
310    .comment       0 : { *(.comment) }
311    /* DWARF debug sections.
312       Symbols in the DWARF debugging sections are relative to the beginning
313       of the section so we begin them at 0.  */
314    /* DWARF 1 */
315    .debug          0 : { *(.debug) }
316    .line           0 : { *(.line) }
317    /* GNU DWARF 1 extensions */
318    .debug_srcinfo  0 : { *(.debug_srcinfo) }
319    .debug_sfnames  0 : { *(.debug_sfnames) }
320    /* DWARF 1.1 and DWARF 2 */
321    .debug_aranges  0 : { *(.debug_aranges) }
322    .debug_pubnames 0 : { *(.debug_pubnames) }
323    /* DWARF 2 */
324    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
325    .debug_abbrev   0 : { *(.debug_abbrev) }
326    .debug_line     0 : { *(.debug_line) }
327    .debug_frame    0 : { *(.debug_frame) }
328    .debug_str      0 : { *(.debug_str) }
329    .debug_loc      0 : { *(.debug_loc) }
330    .debug_macinfo  0 : { *(.debug_macinfo) }
331    /* SGI/MIPS DWARF 2 extensions */
332    .debug_weaknames 0 : { *(.debug_weaknames) }
333    .debug_funcnames 0 : { *(.debug_funcnames) }
334    .debug_typenames 0 : { *(.debug_typenames) }
335    .debug_varnames  0 : { *(.debug_varnames) }
336
337    /* Altera debug extensions */
338    .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
339}
340/* provide a pointer for the stack */
341
342/*
343 * Don't override this, override the __alt_stack_* symbols instead.
344 */
345__alt_data_end = 0x00800000;
346
347/*
348 * The next two symbols define the location of the default stack.  You can
349 * override them to move the stack to a different memory.
350 */
351PROVIDE( __alt_stack_pointer = _stack_high );
352PROVIDE( __alt_stack_limit   = _stack_low );
353
354/*
355 * This symbol controls where the start of the heap is.  If the stack is
356 * contiguous with the heap then the stack will contract as memory is
357 * allocated to the heap.
358 * Override this symbol to put the heap in a different memory.
359 */
360PROVIDE( __alt_heap_start    = end );
361
Note: See TracBrowser for help on using the repository browser.