nios2elf_PE2.l

説明を見る。
00001 MEMORY
00002 {
00003     reset : ORIGIN = 0x02100000, LENGTH = 32
00004     ext_flash : ORIGIN = 0x00000020, LENGTH = 8388576
00005     ext_ram : ORIGIN = 0x07000000, LENGTH = 1048576
00006     sdram : ORIGIN = 0x05000000, LENGTH = 16777216
00007     onchip_ram_1 : ORIGIN = 0x01100020, LENGTH = 65504
00008     onchip_ram_2 : ORIGIN = 0x02100020, LENGTH = 65504
00009     onchip_ram_3 : ORIGIN = 0x03100020, LENGTH = 65504
00010     onchip_ram_4 : ORIGIN = 0x04100020, LENGTH = 65504
00011 }
00012 
00013     /* Define symbols for each memory base-address */
00014  __alt_mem_ext_flash = 0x00000000 ;
00015  __alt_mem_ext_ram = 0x07000000 ;
00016  __alt_mem_sdram = 0x05000000 ;
00017  __alt_mem_onchip_ram_1 = 0x01100000 ;
00018  __alt_mem_onchip_ram_2 = 0x02100000 ;
00019  __alt_mem_onchip_ram_3 = 0x03100000 ;
00020  __alt_mem_onchip_ram_4 = 0x04100000 ;
00021 
00022 PROVIDE(_hardware_init_hook = 0);
00023 PROVIDE(_software_init_hook = 0);
00024 PROVIDE(software_term_hook = 0);
00025 
00026 OUTPUT_FORMAT( "elf32-littlenios2",
00027                "elf32-littlenios2",
00028                "elf32-littlenios2" )
00029 OUTPUT_ARCH( nios2 )
00030 ENTRY( _start )
00031 
00032 /* Do we need any of these for elf?
00033    __DYNAMIC = 0;
00034  */
00035 
00036 SECTIONS
00037 {
00038     .entry :
00039     {
00040         KEEP (*(.entry))
00041     } > reset
00042 
00043     .exceptions :
00044     {
00045         PROVIDE (__ram_exceptions_start = ABSOLUTE(.));
00046         . = ALIGN(0x20);
00047         *(.irq)
00048         KEEP (*(.exceptions.entry.label));
00049         KEEP (*(.exceptions.entry.user));
00050         KEEP (*(.exceptions.entry));
00051         KEEP (*(.exceptions.irqtest.user));
00052         KEEP (*(.exceptions.irqtest));
00053         KEEP (*(.exceptions.irqhandler.user));
00054         KEEP (*(.exceptions.irqhandler));
00055         KEEP (*(.exceptions.irqreturn.user));
00056         KEEP (*(.exceptions.irqreturn));
00057         KEEP (*(.exceptions.notirq.label));
00058         KEEP (*(.exceptions.notirq.user));
00059         KEEP (*(.exceptions.notirq));
00060         KEEP (*(.exceptions.soft.user));
00061         KEEP (*(.exceptions.soft));
00062         KEEP (*(.exceptions.unknown.user));
00063         KEEP (*(.exceptions.unknown));
00064         KEEP (*(.exceptions.exit.label));
00065         KEEP (*(.exceptions.exit.user));
00066         KEEP (*(.exceptions.exit));
00067         KEEP (*(.exceptions));
00068         PROVIDE (__ram_exceptions_end = ABSOLUTE(.));
00069     } > onchip_ram_2
00070 
00071     PROVIDE (__flash_exceptions_start = LOADADDR(.exceptions));
00072 
00073     .text :
00074     {
00075         /*
00076          * All code sections are merged into the text output section, along with
00077          * the read only data sections.
00078          *
00079          */
00080 
00081         PROVIDE (stext = ABSOLUTE(.));
00082 
00083         *(.interp)
00084         *(.hash)
00085         *(.dynsym)
00086         *(.dynstr)
00087         *(.gnu.version)
00088         *(.gnu.version_d)
00089         *(.gnu.version_r)
00090         *(.rel.init)
00091         *(.rela.init)
00092         *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
00093         *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
00094         *(.rel.fini)
00095         *(.rela.fini)
00096         *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
00097         *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
00098         *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
00099         *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
00100         *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
00101         *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
00102         *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
00103         *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
00104         *(.rel.ctors)
00105         *(.rela.ctors)
00106         *(.rel.dtors)
00107         *(.rela.dtors)
00108         *(.rel.got)
00109         *(.rela.got)
00110         *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
00111         *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
00112         *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
00113         *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
00114         *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
00115         *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
00116         *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
00117         *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
00118         *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
00119         *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
00120         *(.rel.plt)
00121         *(.rela.plt)
00122 
00123         KEEP (*(.init))
00124         *(.plt)
00125         *(.text .stub .text.* .gnu.linkonce.t.*)
00126 
00127         /* .gnu.warning sections are handled specially by elf32.em.  */
00128 
00129         *(.gnu.warning.*)
00130         KEEP (*(.fini))
00131         PROVIDE (__etext = ABSOLUTE(.));
00132         PROVIDE (_etext = ABSOLUTE(.));
00133         PROVIDE (etext = ABSOLUTE(.));
00134 
00135         *(.eh_frame_hdr)
00136         /* Ensure the __preinit_array_start label is properly aligned.  We
00137            could instead move the label definition inside the section, but
00138            the linker would then create the section even if it turns out to
00139            be empty, which isn't pretty.  */
00140         . = ALIGN(32 / 8);
00141         PROVIDE (__preinit_array_start = ABSOLUTE(.));
00142         *(.preinit_array)
00143         PROVIDE (__preinit_array_end = ABSOLUTE(.));
00144         PROVIDE (__init_array_start = ABSOLUTE(.));
00145         *(.init_array)
00146         PROVIDE (__init_array_end = ABSOLUTE(.));
00147         PROVIDE (__fini_array_start = ABSOLUTE(.));
00148         *(.fini_array)
00149         PROVIDE (__fini_array_end = ABSOLUTE(.));
00150         SORT(CONSTRUCTORS)
00151         KEEP (*(.eh_frame))
00152         *(.gcc_except_table)
00153         *(.dynamic)
00154         PROVIDE (__CTOR_LIST__ = ABSOLUTE(.));
00155         KEEP (*(.ctors))
00156         KEEP (*(SORT(.ctors.*)))
00157         PROVIDE (__CTOR_END__ = ABSOLUTE(.));
00158         PROVIDE (__DTOR_LIST__ = ABSOLUTE(.));
00159         KEEP (*(.dtors))
00160         KEEP (*(SORT(.dtors.*)))
00161         PROVIDE (__DTOR_END__ = ABSOLUTE(.));
00162         KEEP (*(.jcr))
00163         . = ALIGN(32 / 8);
00164     } >  onchip_ram_2
00165 
00166     .rodata :
00167     {
00168         PROVIDE (__ram_rodata_start = ABSOLUTE(.));
00169         . = ALIGN(32 / 8);
00170         *(.rodata .rodata.* .gnu.linkonce.r.*)
00171         *(.rodata1)
00172         . = ALIGN(32 / 8);
00173         PROVIDE (__ram_rodata_end = ABSOLUTE(.));
00174     } > onchip_ram_2
00175 
00176     PROVIDE (__flash_rodata_start = LOADADDR(.rodata));
00177 
00178     .rwdata  :
00179     {
00180         PROVIDE (__ram_rwdata_start = ABSOLUTE(.));
00181         . = ALIGN(32 / 8);
00182         *(.got.plt) *(.got)
00183         *(.data1)
00184         *(.data .data.* .gnu.linkonce.d.*)
00185 
00186         _gp = ABSOLUTE(. + 0x8000);
00187         PROVIDE(gp = _gp);
00188 
00189         *(.sdata .sdata.* .gnu.linkonce.s.*)
00190         *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
00191 
00192         . = ALIGN(32 / 8);
00193         _edata = ABSOLUTE(.);
00194         PROVIDE (edata = ABSOLUTE(.));
00195         PROVIDE (__ram_rwdata_end = ABSOLUTE(.));
00196     } > onchip_ram_2
00197 
00198     PROVIDE (__flash_rwdata_start = LOADADDR(.rwdata));
00199 
00200     .bss :
00201     {
00202         __bss_start = ABSOLUTE(.);
00203         PROVIDE (__sbss_start = ABSOLUTE(.));
00204         PROVIDE (___sbss_start = ABSOLUTE(.));
00205 
00206         *(.dynsbss)
00207         *(.sbss .sbss.* .gnu.linkonce.sb.*)
00208         *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
00209         *(.scommon)
00210 
00211         PROVIDE (__sbss_end = ABSOLUTE(.));
00212         PROVIDE (___sbss_end = ABSOLUTE(.));
00213 
00214         *(.dynbss)
00215         *(.bss .bss.* .gnu.linkonce.b.*)
00216         *(COMMON)
00217 
00218         . = ALIGN(32 / 8);
00219         __bss_end = ABSOLUTE(.);
00220     } > onchip_ram_2
00221 
00222     .shared :
00223     {
00224         *(.shared_memory)
00225     } > ext_ram
00226 
00227     /*
00228      * One output section for each of the available partitions. These are not
00229      * used by default, but can be used by users applications using the .section
00230      * directive.
00231      *
00232      * The memory partition used for the heap is treated in  special way, i.e. a
00233      * symbol is added to point to the heap start.
00234      *
00235      * Note that when running from flash, these sections are not loaded by the
00236      * HAL.
00237      *
00238      */
00239 
00240     .ext_flash :
00241     {
00242         PROVIDE (_alt_partition_ext_flash_start = ABSOLUTE(.));
00243         *(.ext_flash .ext_flash.*)
00244         . = ALIGN(32 / 8);
00245         PROVIDE (_alt_partition_ext_flash_end = ABSOLUTE(.));
00246     } > ext_flash
00247 
00248     PROVIDE (_alt_partition_ext_flash_load_addr = LOADADDR(.ext_flash));
00249 
00250     .ext_ram :
00251     {
00252         PROVIDE (_alt_partition_ext_ram_start = ABSOLUTE(.));
00253         *(.ext_ram .ext_ram.*)
00254         . = ALIGN(32 / 8);
00255         PROVIDE (_alt_partition_ext_ram_end = ABSOLUTE(.));
00256     } > ext_ram
00257 
00258     PROVIDE (_alt_partition_ext_ram_load_addr = LOADADDR(.ext_ram));
00259 
00260     .sdram :
00261     {
00262         PROVIDE (_alt_partition_sdram_start = ABSOLUTE(.));
00263         *(.sdram .sdram.*)
00264         . = ALIGN(32 / 8);
00265         PROVIDE (_alt_partition_sdram_end = ABSOLUTE(.));
00266         _end = ABSOLUTE(.);
00267         end = ABSOLUTE(.);
00268     } > sdram
00269 
00270     PROVIDE (_alt_partition_sdram_load_addr = LOADADDR(.sdram));
00271 
00272     .onchip_ram_1 :
00273     {
00274         PROVIDE (_alt_partition_onchip_ram_1_start = ABSOLUTE(.));
00275         *(.onchip_ram_1 .onchip_ram_1.*)
00276         . = ALIGN(32 / 8);
00277         PROVIDE (_alt_partition_onchip_ram_1_end = ABSOLUTE(.));
00278     } > onchip_ram_1
00279 
00280     PROVIDE (_alt_partition_onchip_ram_1_load_addr = LOADADDR(.onchip_ram_1));
00281 
00282     .onchip_ram_2 :
00283     {
00284         PROVIDE (_alt_partition_onchip_ram_2_start = ABSOLUTE(.));
00285         *(.onchip_ram_2 .onchip_ram_2.*)
00286         . = ALIGN(32 / 8);
00287         PROVIDE (_alt_partition_onchip_ram_2_end = ABSOLUTE(.));
00288     } > onchip_ram_2
00289 
00290     PROVIDE (_alt_partition_onchip_ram_2_load_addr = LOADADDR(.onchip_ram_2));
00291 
00292     .onchip_ram_3 :
00293     {
00294         PROVIDE (_alt_partition_onchip_ram_3_start = ABSOLUTE(.));
00295         *(.onchip_ram_3 .onchip_ram_3.*)
00296         . = ALIGN(32 / 8);
00297         PROVIDE (_alt_partition_onchip_ram_3_end = ABSOLUTE(.));
00298     } > onchip_ram_3
00299 
00300     PROVIDE (_alt_partition_onchip_ram_3_load_addr = LOADADDR(.onchip_ram_3));
00301 
00302     .onchip_ram_4 :
00303     {
00304         PROVIDE (_alt_partition_onchip_ram_4_start = ABSOLUTE(.));
00305         *(.onchip_ram_4 .onchip_ram_4.*)
00306         . = ALIGN(32 / 8);
00307         PROVIDE (_alt_partition_onchip_ram_4_end = ABSOLUTE(.));
00308     } > onchip_ram_4
00309 
00310     PROVIDE (_alt_partition_onchip_ram_4_load_addr = LOADADDR(.onchip_ram_4));
00311 
00312     /*
00313      * Stabs debugging sections.
00314      *
00315      */
00316 
00317     .stab          0 : { *(.stab) }
00318     .stabstr       0 : { *(.stabstr) }
00319     .stab.excl     0 : { *(.stab.excl) }
00320     .stab.exclstr  0 : { *(.stab.exclstr) }
00321     .stab.index    0 : { *(.stab.index) }
00322     .stab.indexstr 0 : { *(.stab.indexstr) }
00323     .comment       0 : { *(.comment) }
00324     /* DWARF debug sections.
00325        Symbols in the DWARF debugging sections are relative to the beginning
00326        of the section so we begin them at 0.  */
00327     /* DWARF 1 */
00328     .debug          0 : { *(.debug) }
00329     .line           0 : { *(.line) }
00330     /* GNU DWARF 1 extensions */
00331     .debug_srcinfo  0 : { *(.debug_srcinfo) }
00332     .debug_sfnames  0 : { *(.debug_sfnames) }
00333     /* DWARF 1.1 and DWARF 2 */
00334     .debug_aranges  0 : { *(.debug_aranges) }
00335     .debug_pubnames 0 : { *(.debug_pubnames) }
00336     /* DWARF 2 */
00337     .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
00338     .debug_abbrev   0 : { *(.debug_abbrev) }
00339     .debug_line     0 : { *(.debug_line) }
00340     .debug_frame    0 : { *(.debug_frame) }
00341     .debug_str      0 : { *(.debug_str) }
00342     .debug_loc      0 : { *(.debug_loc) }
00343     .debug_macinfo  0 : { *(.debug_macinfo) }
00344     /* SGI/MIPS DWARF 2 extensions */
00345     .debug_weaknames 0 : { *(.debug_weaknames) }
00346     .debug_funcnames 0 : { *(.debug_funcnames) }
00347     .debug_typenames 0 : { *(.debug_typenames) }
00348     .debug_varnames  0 : { *(.debug_varnames) }
00349 
00350     /* Altera debug extensions */
00351     .debug_alt_sim_info 0 : { *(.debug_alt_sim_info) }
00352 }
00353 /* provide a pointer for the stack */
00354 
00355 /*
00356  * Don't override this, override the __alt_stack_* symbols instead.
00357  */
00358 __alt_data_end = 0x06000000;
00359 
00360 /*
00361  * The next two symbols define the location of the default stack.  You can
00362  * override them to move the stack to a different memory.
00363  */
00364 PROVIDE( __alt_stack_pointer = __alt_data_end );
00365 PROVIDE( __alt_stack_limit   = _end );
00366 
00367 /*
00368  * This symbol controls where the start of the heap is.  If the stack is
00369  * contiguous with the heap then the stack will contract as memory is
00370  * allocated to the heap.
00371  * Override this symbol to put the heap in a different memory.
00372  */
00373 PROVIDE( __alt_heap_start    = end );
00374 

Copyright © 2006 by TAKAGI Nobuhisa.
このページは Mon Apr 3 23:49:12 2006 に Doxygen によって生成されました。