Home | History | Annotate | Line # | Download | only in scripttempl
ft32.sc revision 1.1.1.2
      1      1.1  christos TORS=".tors :
      2      1.1  christos   {
      3      1.1  christos     ___ctors = . ;
      4      1.1  christos     *(.ctors)
      5      1.1  christos     ___ctors_end = . ;
      6      1.1  christos     ___dtors = . ;
      7      1.1  christos     *(.dtors)
      8      1.1  christos     ___dtors_end = . ;
      9      1.1  christos     . = ALIGN(4);
     10      1.1  christos   } > ram"
     11      1.1  christos 
     12      1.1  christos cat <<EOF
     13      1.1  christos OUTPUT_FORMAT("${OUTPUT_FORMAT}")
     14      1.1  christos OUTPUT_ARCH(${ARCH})
     15      1.1  christos ${LIB_SEARCH_DIRS}
     16      1.1  christos 
     17      1.1  christos MEMORY
     18      1.1  christos {
     19  1.1.1.2  christos   /* Note - we cannot use "PROVIDE(len)" ... "LENGTH = len" as
     20  1.1.1.2  christos      PROVIDE statements are not evaluated inside MEMORY blocks.  */
     21  1.1.1.2  christos   flash     (rx)   : ORIGIN = 0, LENGTH = 256K
     22  1.1.1.2  christos   ram       (rw!x) : ORIGIN = 0x800000, LENGTH = 64K
     23      1.1  christos }
     24      1.1  christos SECTIONS
     25      1.1  christos {
     26      1.1  christos   .text :
     27      1.1  christos   {
     28      1.1  christos     *(.text*)
     29      1.1  christos     *(.strings)
     30      1.1  christos     *(._pm*)
     31      1.1  christos     *(.init)
     32      1.1  christos     *(.fini)
     33      1.1  christos     ${RELOCATING+ _etext = . ; }
     34      1.1  christos     . = ALIGN(4);
     35      1.1  christos   } ${RELOCATING+ > flash}
     36      1.1  christos   ${CONSTRUCTING+${TORS}}
     37  1.1.1.2  christos   .data	: ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))}
     38      1.1  christos   {
     39      1.1  christos     *(.data)
     40      1.1  christos     *(.rodata)
     41      1.1  christos     *(.rodata*)
     42      1.1  christos     ${RELOCATING+ _edata = . ; }
     43      1.1  christos   } ${RELOCATING+ > ram}
     44  1.1.1.2  christos   .bss  ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
     45      1.1  christos   {
     46      1.1  christos     ${RELOCATING+ _bss_start = . ; }
     47      1.1  christos     *(.bss)
     48      1.1  christos     *(COMMON)
     49      1.1  christos     ${RELOCATING+ _end = . ;  }
     50      1.1  christos   } ${RELOCATING+ > ram}
     51      1.1  christos 
     52      1.1  christos   ${RELOCATING+ __data_load_start = LOADADDR(.data); }
     53      1.1  christos   ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
     54      1.1  christos 
     55      1.1  christos   .stab 0 ${RELOCATING+(NOLOAD)} :
     56      1.1  christos   {
     57      1.1  christos     *(.stab)
     58      1.1  christos   }
     59      1.1  christos   .stabstr 0 ${RELOCATING+(NOLOAD)} :
     60      1.1  christos   {
     61      1.1  christos     *(.stabstr)
     62      1.1  christos   }
     63  1.1.1.2  christos EOF
     64  1.1.1.2  christos 
     65  1.1.1.2  christos . $srcdir/scripttempl/DWARF.sc
     66  1.1.1.2  christos 
     67  1.1.1.2  christos cat <<EOF
     68      1.1  christos }
     69      1.1  christos EOF
     70