Home | History | Annotate | Line # | Download | only in scripttempl
      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.5  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.5  christos EOF
     17  1.1  christos 
     18  1.5  christos test -n "${RELOCATING}" && cat <<EOF
     19  1.4  christos /* Allow the command line to override the memory region sizes.  */
     20  1.4  christos __PMSIZE = DEFINED(__PMSIZE)  ? __PMSIZE : 256K;
     21  1.4  christos __RAMSIZE = DEFINED(__RAMSIZE) ? __RAMSIZE : 64K;
     22  1.4  christos 
     23  1.1  christos MEMORY
     24  1.1  christos {
     25  1.4  christos   flash     (rx)   : ORIGIN = 0,        LENGTH = __PMSIZE
     26  1.4  christos   ram       (rw!x) : ORIGIN = 0x800000, LENGTH = __RAMSIZE
     27  1.1  christos }
     28  1.5  christos EOF
     29  1.4  christos 
     30  1.5  christos cat <<EOF
     31  1.1  christos SECTIONS
     32  1.1  christos {
     33  1.1  christos   .text :
     34  1.1  christos   {
     35  1.5  christos     *(.text${RELOCATING+*})
     36  1.5  christos     ${RELOCATING+*(.strings)
     37  1.1  christos     *(._pm*)
     38  1.5  christos     KEEP (*(SORT_NONE(.init)))
     39  1.5  christos     KEEP (*(SORT_NONE(.fini)))
     40  1.5  christos     _etext = .;
     41  1.5  christos     . = ALIGN(4);}
     42  1.1  christos   } ${RELOCATING+ > flash}
     43  1.1  christos   ${CONSTRUCTING+${TORS}}
     44  1.3  christos   .data	: ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))}
     45  1.1  christos   {
     46  1.1  christos     *(.data)
     47  1.5  christos     ${RELOCATING+*(.rodata)
     48  1.1  christos     *(.rodata*)
     49  1.5  christos     _edata = .;
     50  1.5  christos     . = ALIGN(4);}
     51  1.1  christos   } ${RELOCATING+ > ram}
     52  1.3  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.5  christos     ${RELOCATING+*(COMMON)
     57  1.5  christos     _end = .;
     58  1.5  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.3  christos EOF
     64  1.3  christos 
     65  1.6  christos source_sh $srcdir/scripttempl/misc-sections.sc
     66  1.6  christos source_sh $srcdir/scripttempl/DWARF.sc
     67  1.3  christos 
     68  1.3  christos cat <<EOF
     69  1.1  christos }
     70  1.1  christos EOF
     71