Home | History | Annotate | Download | only in scripttempl
      1 # Linker script for A/UX.
      2 #
      3 # Copyright (C) 2014 Free Software Foundation, Inc.
      4 # 
      5 # Copying and distribution of this file, with or without modification,
      6 # are permitted in any medium without royalty provided the copyright
      7 # notice and this notice are preserved.
      8 
      9 test -z "$ENTRY" && ENTRY=_start
     10 INIT='.init : { *(.init) }'
     11 FINI='.fini : { *(.fini) }'
     12 CTORS='.ctors : { *(.ctors) }'
     13 DTORS='.dtors : { *(.dtors) }'
     14 
     15 cat <<EOF
     16 /* Copyright (C) 2014 Free Software Foundation, Inc.
     17 
     18    Copying and distribution of this script, with or without modification,
     19    are permitted in any medium without royalty provided the copyright
     20    notice and this notice are preserved.  */
     21 
     22 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
     23 ${LIB_SEARCH_DIRS}
     24 
     25 ${RELOCATING+ENTRY (${ENTRY})}
     26 
     27 SECTIONS
     28 {
     29   .text ${RELOCATING+ $TEXT_START_ADDR} : {
     30     ${RELOCATING+ *(.init)}
     31     ${RELOCATING+ *(.fini)}
     32     *(.text)
     33     ${RELOCATING+ . = ALIGN(4);}
     34     ${RELOCATING+ *(.ctors)}
     35     ${RELOCATING+ *(.dtors)}
     36     ${RELOCATING+ etext = .;}
     37     ${RELOCATING+ _etext = .;}
     38   } =0x4E714E71
     39   .data ${RELOCATING+ $DATA_ALIGNMENT} : {
     40     *(.data)
     41     ${RELOCATING+ edata = .;}
     42     ${RELOCATING+ _edata = .;}
     43   }
     44   .bss : {
     45     *(.bss)
     46     *(COMMON)
     47     ${RELOCATING+ end = .;}
     48     ${RELOCATING+ _end = .;}
     49   }
     50   ${RELOCATING- ${INIT}}
     51   ${RELOCATING- ${FINI}}
     52   ${RELOCATING- ${CTORS}}
     53   ${RELOCATING- ${DTORS}}
     54 
     55   .comment 0 ${RELOCATING+(NOLOAD)} : { [ .comment ] [ .ident ] }
     56   .stab 0 ${RELOCATING+(NOLOAD)} : { [ .stab ] }
     57   .stabstr 0 ${RELOCATING+(NOLOAD)} : { [ .stabstr ] }
     58 }
     59 EOF
     60