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

5
Last change on this file since b618d8c was b618d8c, checked in by Sebastian Huber <sebastian.huber@…>, on 09/16/15 at 05:13:58

Add RTEMS linker sets

Update #2408.

  • 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.* KEEP (*(SORT(.rtemsroset.*))) .gnu.linkonce.r.*)
197        *(.rodata1)
198    } > onchip_memory_0
199
200    .tdata : {
201        _TLS_Data_begin = .;
202        *(.tdata .tdata.* .gnu.linkonce.td.*)
203        _TLS_Data_end = .;
204    } > onchip_memory_0
205
206    .tbss : {
207        _TLS_BSS_begin = .;
208        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
209        _TLS_BSS_end = .;
210        . = ALIGN(32 / 8);
211        PROVIDE (__ram_rodata_end = ABSOLUTE(.));
212    } > onchip_memory_0
213
214    _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
215    _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
216    _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
217    _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
218    _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
219    _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
220
221    PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
222
223    .rwdata  :
224    {
225        PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
226        . = ALIGN(32 / 8);
227        *(.got.plt) *(.got)
228        *(.data1)
229        *(.data .data.* .gnu.linkonce.d.*)
230        KEEP (*(SORT(.rtemsrwset.*)))
231
232        _gp = ABSOLUTE(. + 0x8000);
233        PROVIDE(gp = _gp);
234
235        *(.sdata .sdata.* .gnu.linkonce.s.*)
236        *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
237
238        . = ALIGN(32 / 8);
239        _edata = ABSOLUTE(.);
240        PROVIDE (edata = ABSOLUTE(.));
241        PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
242    } > onchip_memory_0
243
244    PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata));
245
246    .bss :
247    {
248        __bss_start = ABSOLUTE(.);
249        PROVIDE (__sbss_start = ABSOLUTE(.));
250        PROVIDE (___sbss_start = ABSOLUTE(.));
251
252        *(.dynsbss)
253        *(.sbss .sbss.* .gnu.linkonce.sb.*)
254        *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
255        *(.scommon)
256
257        PROVIDE (__sbss_end = ABSOLUTE(.));
258        PROVIDE (___sbss_end = ABSOLUTE(.));
259
260        *(.dynbss)
261        *(.bss .bss.* .gnu.linkonce.b.*)
262        *(COMMON)
263
264        . = ALIGN(32 / 8);
265        __bss_end = ABSOLUTE(.);
266        _stack_low = ABSOLUTE(.);
267        . += StackSize;
268        _stack_high = ABSOLUTE(.);
269        WorkAreaBase = .;
270    } > onchip_memory_0
271
272    /*
273     * One output section for each of the available partitions. These are not
274     * used by default, but can be used by users applications using the .section
275     * directive.
276     *
277     * The memory partition used for the heap is treated in  special way, i.e. a
278     * symbol is added to point to the heap start.
279     *
280     * Note that when running from flash, these sections are not loaded by the
281     * HAL.
282     *
283     */
284
285    .onchip_memory_0 :
286    {
287        PROVIDE (_alt_partition_onchip_memory_0_start = ABSOLUTE(.));
288        *(.onchip_memory_0 .onchip_memory_0.*)
289        . = ALIGN(32 / 8);
290        PROVIDE (_alt_partition_onchip_memory_0_end = ABSOLUTE(.));
291        _end = ABSOLUTE(.);
292        end = ABSOLUTE(.);
293
294    } > onchip_memory_0
295
296    PROVIDE (_alt_partition_onchip_memory_0_load_addr = LOADADDR(.onchip_memory_0));
297
298    /*
299     * Stabs debugging sections.
300     *
301     */
302
303    .stab          0 : { *(.stab) }
304    .stabstr       0 : { *(.stabstr) }
305    .stab.excl     0 : { *(.stab.excl) }
306    .stab.exclstr  0 : { *(.stab.exclstr) }
307    .stab.index    0 : { *(.stab.index) }
308    .stab.indexstr 0 : { *(.stab.indexstr) }
309    .comment       0 : { *(.comment) }
310    /* DWARF debug sections.
311       Symbols in the DWARF debugging sections are relative to the beginning
312       of the section so we begin them at 0.  */
313    /* DWARF 1 */
314    .debug          0 : { *(.debug) }
315    .line           0 : { *(.line) }
316    /* GNU DWARF 1 extensions */
317    .debug_srcinfo  0 : { *(.debug_srcinfo) }
318    .debug_sfnames  0 : { *(.debug_sfnames) }
319    /* DWARF 1.1 and DWARF 2 */
320    .debug_aranges  0 : { *(.debug_aranges) }
321    .debug_pubnames 0 : { *(.debug_pubnames) }
322    /* DWARF 2 */
323    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
324    .debug_abbrev   0 : { *(.debug_abbrev) }
325    .debug_line     0 : { *(.debug_line) }
326    .debug_frame    0 : { *(.debug_frame) }
327    .debug_str      0 : { *(.debug_str) }
328    .debug_loc      0 : { *(.debug_loc) }
329    .debug_macinfo  0 : { *(.debug_macinfo) }
330    /* SGI/MIPS DWARF 2 extensions */
331    .debug_weaknames 0 : { *(.debug_weaknames) }
332    .debug_funcnames 0 : { *(.debug_funcnames) }
333    .debug_typenames 0 : { *(.debug_typenames) }
334    .debug_varnames  0 : { *(.debug_varnames) }
335
336    /* Altera debug extensions */
337    .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
338}
339/* provide a pointer for the stack */
340
341/*
342 * Don't override this, override the __alt_stack_* symbols instead.
343 */
344__alt_data_end = 0x00800000;
345
346/*
347 * The next two symbols define the location of the default stack.  You can
348 * override them to move the stack to a different memory.
349 */
350PROVIDE( __alt_stack_pointer = _stack_high );
351PROVIDE( __alt_stack_limit   = _stack_low );
352
353/*
354 * This symbol controls where the start of the heap is.  If the stack is
355 * contiguous with the heap then the stack will contract as memory is
356 * allocated to the heap.
357 * Override this symbol to put the heap in a different memory.
358 */
359PROVIDE( __alt_heap_start    = end );
360
Note: See TracBrowser for help on using the repository browser.