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

4.115
Last change on this file since 960fd85 was 960fd85, checked in by Sebastian Huber <sebastian.huber@…>, on 01/28/14 at 10:52:17

bsps: Thread-local storage (TLS) for linkcmds

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