Home | History | Annotate | Line # | Download | only in scripttempl
ft32.sc revision 1.1.1.4
      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.1.4  christos   } ${RELOCATING+ > 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.1.4  christos EOF
     17      1.1  christos 
     18  1.1.1.4  christos test -n "${RELOCATING}" && cat <<EOF
     19  1.1.1.3  christos /* Allow the command line to override the memory region sizes.  */
     20  1.1.1.3  christos __PMSIZE = DEFINED(__PMSIZE)  ? __PMSIZE : 256K;
     21  1.1.1.3  christos __RAMSIZE = DEFINED(__RAMSIZE) ? __RAMSIZE : 64K;
     22  1.1.1.3  christos 
     23      1.1  christos MEMORY
     24      1.1  christos {
     25  1.1.1.3  christos   flash     (rx)   : ORIGIN = 0,        LENGTH = __PMSIZE
     26  1.1.1.3  christos   ram       (rw!x) : ORIGIN = 0x800000, LENGTH = __RAMSIZE
     27      1.1  christos }
     28  1.1.1.4  christos EOF
     29  1.1.1.3  christos 
     30  1.1.1.4  christos cat <<EOF
     31      1.1  christos SECTIONS
     32      1.1  christos {
     33      1.1  christos   .text :
     34      1.1  christos   {
     35  1.1.1.4  christos     *(.text${RELOCATING+*})
     36  1.1.1.4  christos     ${RELOCATING+*(.strings)
     37      1.1  christos     *(._pm*)
     38  1.1.1.4  christos     KEEP (*(SORT_NONE(.init)))
     39  1.1.1.4  christos     KEEP (*(SORT_NONE(.fini)))
     40  1.1.1.4  christos     _etext = .;
     41  1.1.1.4  christos     . = ALIGN(4);}
     42      1.1  christos   } ${RELOCATING+ > flash}
     43      1.1  christos   ${CONSTRUCTING+${TORS}}
     44  1.1.1.2  christos   .data	: ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))}
     45      1.1  christos   {
     46      1.1  christos     *(.data)
     47  1.1.1.4  christos     ${RELOCATING+*(.rodata)
     48      1.1  christos     *(.rodata*)
     49  1.1.1.4  christos     _edata = .;
     50  1.1.1.4  christos     . = ALIGN(4);}
     51      1.1  christos   } ${RELOCATING+ > ram}
     52  1.1.1.2  christos   .bss  ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
     53      1.1  christos   {
     54      1.1  christos     ${RELOCATING+ _bss_start = . ; }
     55      1.1  christos     *(.bss)
     56  1.1.1.4  christos     ${RELOCATING+*(COMMON)
     57  1.1.1.4  christos     _end = .;
     58  1.1.1.4  christos     . = ALIGN(4);}
     59      1.1  christos   } ${RELOCATING+ > ram}
     60      1.1  christos 
     61      1.1  christos   ${RELOCATING+ __data_load_start = LOADADDR(.data); }
     62      1.1  christos   ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
     63      1.1  christos 
     64      1.1  christos   .stab 0 ${RELOCATING+(NOLOAD)} :
     65      1.1  christos   {
     66      1.1  christos     *(.stab)
     67      1.1  christos   }
     68      1.1  christos   .stabstr 0 ${RELOCATING+(NOLOAD)} :
     69      1.1  christos   {
     70      1.1  christos     *(.stabstr)
     71      1.1  christos   }
     72  1.1.1.2  christos EOF
     73  1.1.1.2  christos 
     74  1.1.1.2  christos . $srcdir/scripttempl/DWARF.sc
     75  1.1.1.2  christos 
     76  1.1.1.2  christos cat <<EOF
     77      1.1  christos }
     78      1.1  christos EOF
     79