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

4.104.114.95
Last change on this file since d1f57b5 was d1f57b5, checked in by Joel Sherrill <joel.sherrill@…>, on 03/03/08 at 23:07:47

2008-03-03 Joel Sherrill <joel.sherrill@…>

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