Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils/ld/scripttempl
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/ld/scripttempl/aix.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33# unimportant.  The native linker aligns the sections on boundaries
    44# specified by the -H option.
     5
    56cat <<EOF
    6 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
    77OUTPUT_ARCH(${ARCH})
    88${RELOCATING+${LIB_SEARCH_DIRS}}
     
    1111{
    1212  .pad 0 : { *(.pad) }
     13
     14  . = 0x10000000;
    1315  .text ${RELOCATING-0} : {
    1416    ${RELOCATING+PROVIDE (_text = .);}
     
    2325    ${RELOCATING+PROVIDE (_etext = .);}
    2426  }
    25   .data 0 : {
     27  . = ALIGN (0x10000000);
     28  .data . : {
    2629    ${RELOCATING+PROVIDE (_data = .);}
    2730    *(.data)
    2831    *(.rw)
    2932    *(.sv)
     33    *(.sv64)
     34    *(.sv3264)
    3035    *(.ua)
    3136    . = ALIGN(4);
     
    4651    ${RELOCATING+PROVIDE (end = .);}
    4752  }
    48   .loader 0 : {
     53
     54  .loader : {
    4955    *(.loader)
    5056  }
    51   .debug 0 : {
     57 
     58  .debug : {
    5259    *(.debug)
    5360  }
  • branches/GNU/src/binutils/ld/scripttempl/armaout.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2121    *(.data)
    2222    ${CONSTRUCTING+CONSTRUCTORS}
    23     ${RELOCATING+_edata  =  .;}
    24     ${RELOCATING+__edata  =  .;}
     23    ${RELOCATING+_edata  =  ${DATA_ALIGNMENT};}
     24    ${RELOCATING+__edata  =  ${DATA_ALIGNMENT};}
    2525  }
    26   .bss ${RELOCATING+ SIZEOF(.data) + ADDR (.data)} :
     26  .bss ${RELOCATING+${DATA_ALIGNMENT}} :
    2727  {
    2828   ${RELOCATING+ __bss_start = .};
  • branches/GNU/src/binutils/ld/scripttempl/armcoff.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    77  fi
    88fi
     9
     10# These are substituted in as variables in order to get '}' in a shell
     11# conditional expansion.
     12CTOR='.ctor : {
     13    *(SORT(.ctors.*))
     14    *(.ctor)
     15  }'
     16DTOR='.dtor : {
     17    *(SORT(.dtors.*))
     18    *(.dtor)
     19  }'
     20
    921cat <<EOF
    1022OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
     
    2133  .text ${RELOCATING+ 0x8000} : {
    2234    *(.init)
    23     *(.text)
     35    *(.text*)
    2436    *(.glue_7t)
    2537    *(.glue_7)
     
    3143    *(.fini)
    3244    ${RELOCATING+ etext  =  .;}
     45    ${RELOCATING+ _etext =  .;}
    3346  }
    34   .data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xfffc0fff)}} : {
     47  .data ${RELOCATING+${DATA_ADDR-0x40000 + (ALIGN(0x8) & 0xfffc0fff)}} : {
    3548    ${RELOCATING+  __data_start__ = . ;}
    36     *(.data)
     49    *(.data*)
     50       
     51    ${RELOCATING+*(.gcc_exc*)}
     52    ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
     53    ${RELOCATING+*(.eh_fram*)}
     54    ${RELOCATING+___EH_FRAME_END__ = . ;}
     55    ${RELOCATING+LONG(0);}
     56   
    3757    ${RELOCATING+ __data_end__ = . ;}
    3858    ${RELOCATING+ edata  =  .;}
    3959    ${RELOCATING+ _edata  =  .;}
    4060  }
    41   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
     61  ${CONSTRUCTING+${RELOCATING-$CTOR}}
     62  ${CONSTRUCTING+${RELOCATING-$DTOR}}
     63  .bss ${RELOCATING+ ALIGN(0x8)} :
    4264  {                                     
    4365    ${RELOCATING+ __bss_start__ = . ;}
  • branches/GNU/src/binutils/ld/scripttempl/crisaout.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    4949    ${CONSTRUCTING+ PROVIDE(___ctors = .);}
    5050    ${CONSTRUCTING+ ___elf_ctors_dtors_begin = .;}
    51     ${CONSTRUCTING+ KEEP (*crtbegin.o(.ctors))}
    52     ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))}
     51    ${CONSTRUCTING+ KEEP (*crtbegin*.o(.ctors))}
     52    ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))}
    5353    ${CONSTRUCTING+ KEEP (*(SORT(.ctors.*)))}
    5454    ${CONSTRUCTING+ KEEP (*(.ctors))}
     
    5656
    5757    ${CONSTRUCTING+ PROVIDE(___dtors = .);}
    58     ${CONSTRUCTING+ KEEP (*crtbegin.o(.dtors))}
    59     ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))}
     58    ${CONSTRUCTING+ KEEP (*crtbegin*.o(.dtors))}
     59    ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))}
    6060    ${CONSTRUCTING+ KEEP (*(SORT(.dtors.*)))}
    6161    ${CONSTRUCTING+ KEEP (*(.dtors))}
  • branches/GNU/src/binutils/ld/scripttempl/elf.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#
    22# Unusual variables checked by this code:
    3 #       NOP - two byte opcode for no-op (defaults to 0)
     3#       NOP - four byte opcode for no-op (defaults to 0)
     4#       NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
     5#               empty.
    46#       DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
    57#       INITIAL_READONLY_SECTIONS - at start of text segment
     
    1820#               .data section.
    1921#       OTHER_GOT_SYMBOLS - symbols defined just before .got.
    20 #       OTHER_GOT_SECTIONS - sections just after .got and .sdata.
     22#       OTHER_GOT_SECTIONS - sections just after .got.
     23#       OTHER_SDATA_SECTIONS - sections just after .sdata.
    2124#       OTHER_BSS_SYMBOLS - symbols that appear at the start of the
    2225#               .bss section besides __bss_start.
     
    3336#       FINI_START, FINI_END - statements just before and just after
    3437#       combination of .fini sections.
     38#       STACK_ADDR - start of a .stack section.
     39#       OTHER_END_SYMBOLS - symbols to place right at the end of the script.
    3540#
    3641# When adding sections, do note that the names of some sections are used
     
    5560#  .sdata2      .gnu.linkonce.s2.foo
    5661#  .sbss2       .gnu.linkonce.sb2.foo
     62#  .debug_info  .gnu.linkonce.wi.foo
     63#  .tdata       .gnu.linkonce.td.foo
     64#  .tbss        .gnu.linkonce.tb.foo
    5765#
    5866#  Each of these can also have corresponding .rel.* and .rela.* sections.
     
    6573test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
    6674test "$LD_FLAG" = "N" && DATA_ADDR=.
    67 INTERP=".interp   ${RELOCATING-0} : { *(.interp)        }"
    68 PLT=".plt    ${RELOCATING-0} : { *(.plt)        }"
    69 DYNAMIC=".dynamic     ${RELOCATING-0} : { *(.dynamic) }"
    70 RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
    71 SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
    72 SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
    73 CTOR=".ctors ${CONSTRUCTING-0} :
     75test -n "$CREATE_SHLIB" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
     76test -z "$CREATE_SHLIB" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
     77DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
     78DATA_SEGMENT_END=""
     79if test -n "${COMMONPAGESIZE}"; then
     80  DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
     81  DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
     82fi
     83INTERP=".interp       ${RELOCATING-0} : { *(.interp) }"
     84PLT=".plt          ${RELOCATING-0} : { *(.plt) }"
     85DYNAMIC=".dynamic      ${RELOCATING-0} : { *(.dynamic) }"
     86RODATA=".rodata       ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
     87if test -z "${NO_SMALL_DATA}"; then
     88  SBSS=".sbss         ${RELOCATING-0} :
     89  {
     90    ${RELOCATING+PROVIDE (__sbss_start = .);}
     91    ${RELOCATING+PROVIDE (___sbss_start = .);}
     92    *(.dynsbss)
     93    *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
     94    *(.scommon)
     95    ${RELOCATING+PROVIDE (__sbss_end = .);}
     96    ${RELOCATING+PROVIDE (___sbss_end = .);}
     97  }"
     98  SBSS2=".sbss2        ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
     99  SDATA="/* We want the small data sections together, so single-instruction offsets
     100     can access them all, and initialized data all before uninitialized, so
     101     we can shorten the on-disk segment size.  */
     102  .sdata        ${RELOCATING-0} :
     103  {
     104    ${RELOCATING+${SDATA_START_SYMBOLS}}
     105    *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
     106  }"
     107  SDATA2=".sdata2       ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
     108  REL_SDATA=".rel.sdata    ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
     109  .rela.sdata   ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
     110  REL_SBSS=".rel.sbss     ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
     111  .rela.sbss    ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
     112  REL_SDATA2=".rel.sdata2   ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
     113  .rela.sdata2  ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
     114  REL_SBSS2=".rel.sbss2    ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
     115  .rela.sbss2   ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
     116fi
     117CTOR=".ctors        ${CONSTRUCTING-0} :
    74118  {
    75119    ${CONSTRUCTING+${CTOR_START}}
     
    84128       is in.  */
    85129
    86     KEEP (*crtbegin.o(.ctors))
     130    KEEP (*crtbegin*.o(.ctors))
    87131
    88132    /* We don't want to include the .ctor section from
     
    91135       end of ctors marker and it must be last */
    92136
    93     KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .ctors))
     137    KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
    94138    KEEP (*(SORT(.ctors.*)))
    95139    KEEP (*(.ctors))
    96140    ${CONSTRUCTING+${CTOR_END}}
    97141  }"
    98 
    99 DTOR=" .dtors       ${CONSTRUCTING-0} :
     142DTOR=".dtors        ${CONSTRUCTING-0} :
    100143  {
    101144    ${CONSTRUCTING+${DTOR_START}}
    102     KEEP (*crtbegin.o(.dtors))
    103     KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .dtors))
     145    KEEP (*crtbegin*.o(.dtors))
     146    KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
    104147    KEEP (*(SORT(.dtors.*)))
    105148    KEEP (*(.dtors))
    106149    ${CONSTRUCTING+${DTOR_END}}
     150  }"
     151STACK="  .stack        ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
     152  {
     153    ${RELOCATING+_stack = .;}
     154    *(.stack)
    107155  }"
    108156
     
    138186  ${INITIAL_READONLY_SECTIONS}
    139187  ${TEXT_DYNAMIC+${DYNAMIC}}
    140   .hash        ${RELOCATING-0} : { *(.hash)             }
    141   .dynsym      ${RELOCATING-0} : { *(.dynsym)           }
    142   .dynstr      ${RELOCATING-0} : { *(.dynstr)           }
    143   .gnu.version ${RELOCATING-0} : { *(.gnu.version)      }
    144   .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d)  }
    145   .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r)  }
    146 
    147   .rel.init    ${RELOCATING-0} : { *(.rel.init) }
    148   .rela.init   ${RELOCATING-0} : { *(.rela.init)        }
    149   .rel.text    ${RELOCATING-0} :
     188  .hash         ${RELOCATING-0} : { *(.hash) }
     189  .dynsym       ${RELOCATING-0} : { *(.dynsym) }
     190  .dynstr       ${RELOCATING-0} : { *(.dynstr) }
     191  .gnu.version  ${RELOCATING-0} : { *(.gnu.version) }
     192  .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
     193  .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
     194
     195EOF
     196if [ "x$COMBRELOC" = x ]; then
     197  COMBRELOCCAT=cat
     198else
     199  COMBRELOCCAT="cat > $COMBRELOC"
     200fi
     201eval $COMBRELOCCAT <<EOF
     202  .rel.init     ${RELOCATING-0} : { *(.rel.init) }
     203  .rela.init    ${RELOCATING-0} : { *(.rela.init) }
     204  .rel.text     ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
     205  .rela.text    ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
     206  .rel.fini     ${RELOCATING-0} : { *(.rel.fini) }
     207  .rela.fini    ${RELOCATING-0} : { *(.rela.fini) }
     208  .rel.rodata   ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
     209  .rela.rodata  ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
     210  ${OTHER_READONLY_RELOC_SECTIONS}
     211  .rel.data     ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
     212  .rela.data    ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
     213  .rel.tdata    ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
     214  .rela.tdata   ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
     215  .rel.tbss     ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
     216  .rela.tbss    ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
     217  .rel.ctors    ${RELOCATING-0} : { *(.rel.ctors) }
     218  .rela.ctors   ${RELOCATING-0} : { *(.rela.ctors) }
     219  .rel.dtors    ${RELOCATING-0} : { *(.rel.dtors) }
     220  .rela.dtors   ${RELOCATING-0} : { *(.rela.dtors) }
     221  .rel.got      ${RELOCATING-0} : { *(.rel.got) }
     222  .rela.got     ${RELOCATING-0} : { *(.rela.got) }
     223  ${OTHER_GOT_RELOC_SECTIONS}
     224  ${REL_SDATA}
     225  ${REL_SBSS}
     226  ${REL_SDATA2}
     227  ${REL_SBSS2}
     228  .rel.bss      ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
     229  .rela.bss     ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
     230EOF
     231if [ -n "$COMBRELOC" ]; then
     232cat <<EOF
     233  .rel.dyn      ${RELOCATING-0} :
    150234    {
    151       *(.rel.text)
    152       ${RELOCATING+*(.rel.text.*)}
    153       ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
     235EOF
     236sed -e '/^[     ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/      \1/' $COMBRELOC
     237cat <<EOF
    154238    }
    155   .rela.text   ${RELOCATING-0} :
     239  .rela.dyn     ${RELOCATING-0} :
    156240    {
    157       *(.rela.text)
    158       ${RELOCATING+*(.rela.text.*)}
    159       ${RELOCATING+*(.rela.gnu.linkonce.t.*)}
     241EOF
     242sed -e '/^[     ]*[{}][         ]*$/d;/:[       ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/      \1/' $COMBRELOC
     243cat <<EOF
    160244    }
    161   .rel.fini    ${RELOCATING-0} : { *(.rel.fini) }
    162   .rela.fini   ${RELOCATING-0} : { *(.rela.fini)        }
    163   .rel.rodata  ${RELOCATING-0} :
    164     {
    165       *(.rel.rodata)
    166       ${RELOCATING+*(.rel.rodata.*)}
    167       ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
    168     }
    169   .rela.rodata ${RELOCATING-0} :
    170     {
    171       *(.rela.rodata)
    172       ${RELOCATING+*(.rela.rodata.*)}
    173       ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
    174     }
    175   ${OTHER_READONLY_RELOC_SECTIONS}
    176   .rel.data    ${RELOCATING-0} :
    177     {
    178       *(.rel.data)
    179       ${RELOCATING+*(.rel.data.*)}
    180       ${RELOCATING+*(.rel.gnu.linkonce.d.*)}
    181     }
    182   .rela.data   ${RELOCATING-0} :
    183     {
    184       *(.rela.data)
    185       ${RELOCATING+*(.rela.data.*)}
    186       ${RELOCATING+*(.rela.gnu.linkonce.d.*)}
    187     }
    188   .rel.ctors   ${RELOCATING-0} : { *(.rel.ctors)        }
    189   .rela.ctors  ${RELOCATING-0} : { *(.rela.ctors)       }
    190   .rel.dtors   ${RELOCATING-0} : { *(.rel.dtors)        }
    191   .rela.dtors  ${RELOCATING-0} : { *(.rela.dtors)       }
    192   .rel.got     ${RELOCATING-0} : { *(.rel.got)          }
    193   .rela.got    ${RELOCATING-0} : { *(.rela.got)         }
    194   ${OTHER_GOT_RELOC_SECTIONS}
    195   .rel.sdata   ${RELOCATING-0} :
    196     {
    197       *(.rel.sdata)
    198       ${RELOCATING+*(.rel.sdata.*)}
    199       ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
    200     }
    201   .rela.sdata   ${RELOCATING-0} :
    202     {
    203       *(.rela.sdata)
    204       ${RELOCATING+*(.rela.sdata.*)}
    205       ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
    206     }
    207   .rel.sbss    ${RELOCATING-0} :
    208     {
    209       *(.rel.sbss)
    210       ${RELOCATING+*(.rel.sbss.*)}
    211       ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
    212     }
    213   .rela.sbss   ${RELOCATING-0} :
    214     {
    215       *(.rela.sbss)
    216       ${RELOCATING+*(.rela.sbss.*)}
    217       ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
    218     }
    219   .rel.sdata2  ${RELOCATING-0} :
    220     {
    221       *(.rel.sdata2)
    222       ${RELOCATING+*(.rel.sdata2.*)}
    223       ${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
    224     }
    225   .rela.sdata2 ${RELOCATING-0} :
    226     {
    227       *(.rela.sdata2)
    228       ${RELOCATING+*(.rela.sdata2.*)}
    229       ${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
    230     }
    231   .rel.sbss2   ${RELOCATING-0} :
    232     {
    233       *(.rel.sbss2)     
    234       ${RELOCATING+*(.rel.sbss2.*)}
    235       ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
    236     }
    237   .rela.sbss2  ${RELOCATING-0} :
    238     {
    239       *(.rela.sbss2)   
    240       ${RELOCATING+*(.rela.sbss2.*)}
    241       ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
    242     }
    243   .rel.bss     ${RELOCATING-0} :
    244     {
    245       *(.rel.bss)
    246       ${RELOCATING+*(.rel.bss.*)}
    247       ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
    248     }
    249   .rela.bss    ${RELOCATING-0} :
    250     {
    251       *(.rela.bss)
    252       ${RELOCATING+*(.rela.bss.*)}
    253       ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
    254     }
    255   .rel.plt     ${RELOCATING-0} : { *(.rel.plt)          }
    256   .rela.plt    ${RELOCATING-0} : { *(.rela.plt)         }
     245EOF
     246fi
     247cat <<EOF
     248  .rel.plt      ${RELOCATING-0} : { *(.rel.plt) }
     249  .rela.plt     ${RELOCATING-0} : { *(.rela.plt) }
    257250  ${OTHER_PLT_RELOC_SECTIONS}
    258251
    259   .init        ${RELOCATING-0} :
     252  .init         ${RELOCATING-0} :
    260253  {
    261254    ${RELOCATING+${INIT_START}}
     
    265258
    266259  ${DATA_PLT-${BSS_PLT-${PLT}}}
    267   .text    ${RELOCATING-0} :
     260  .text         ${RELOCATING-0} :
    268261  {
    269262    ${RELOCATING+${TEXT_START_SYMBOLS}}
    270     *(.text)
    271     ${RELOCATING+*(.text.*)}
    272     *(.stub)
     263    *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
    273264    /* .gnu.warning sections are handled specially by elf32.em.  */
    274265    *(.gnu.warning)
    275     ${RELOCATING+*(.gnu.linkonce.t.*)}
    276266    ${RELOCATING+${OTHER_TEXT_SECTIONS}}
    277267  } =${NOP-0}
    278   .fini    ${RELOCATING-0} :
     268  .fini         ${RELOCATING-0} :
    279269  {
    280270    ${RELOCATING+${FINI_START}}
     
    286276  ${RELOCATING+PROVIDE (etext = .);}
    287277  ${WRITABLE_RODATA-${RODATA}}
    288   .rodata1 ${RELOCATING-0} : { *(.rodata1) }
     278  .rodata1      ${RELOCATING-0} : { *(.rodata1) }
    289279  ${CREATE_SHLIB-${SDATA2}}
    290280  ${CREATE_SHLIB-${SBSS2}}
    291   ${RELOCATING+${OTHER_READONLY_SECTIONS}}
     281  ${OTHER_READONLY_SECTIONS}
     282  .eh_frame_hdr : { *(.eh_frame_hdr) }
    292283
    293284  /* Adjust the address for the data segment.  We want to adjust up to
    294285     the same address within the page on the next page up.  */
    295   ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
    296   ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
    297 
    298   .data  ${RELOCATING-0} :
     286  ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
     287  ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
     288
     289  /* Ensure the __preinit_array_start label is properly aligned.  We
     290     could instead move the label definition inside the section, but
     291     the linker would then create the section even if it turns out to
     292     be empty, which isn't pretty.  */
     293  ${RELOCATING+. = ALIGN(${ALIGNMENT});}
     294  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
     295  .preinit_array   ${RELOCATING-0} : { *(.preinit_array) }
     296  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
     297
     298  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
     299  .init_array   ${RELOCATING-0} : { *(.init_array) }
     300  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
     301
     302  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
     303  .fini_array   ${RELOCATING-0} : { *(.fini_array) }
     304  ${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
     305
     306  .data         ${RELOCATING-0} :
    299307  {
    300308    ${RELOCATING+${DATA_START_SYMBOLS}}
    301     *(.data)
    302     ${RELOCATING+*(.data.*)}
    303     ${RELOCATING+*(.gnu.linkonce.d.*)}
     309    *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
    304310    ${CONSTRUCTING+SORT(CONSTRUCTORS)}
    305311  }
    306   .data1 ${RELOCATING-0} : { *(.data1) }
    307   .eh_frame : { KEEP (*(.eh_frame)) }
    308   .gcc_except_table : { *(.gcc_except_table) }
     312  .data1        ${RELOCATING-0} : { *(.data1) }
     313  .tdata        ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
     314  .tbss         ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
     315  .eh_frame     ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
     316  .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
    309317  ${WRITABLE_RODATA+${RODATA}}
    310   ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
     318  ${OTHER_READWRITE_SECTIONS}
     319  ${TEXT_DYNAMIC-${DYNAMIC}}
    311320  ${RELOCATING+${CTOR}}
    312321  ${RELOCATING+${DTOR}}
     322  .jcr          ${RELOCATING-0} : { KEEP (*(.jcr)) }
    313323  ${DATA_PLT+${PLT}}
    314324  ${RELOCATING+${OTHER_GOT_SYMBOLS}}
    315   .got          ${RELOCATING-0} : { *(.got.plt) *(.got) }
     325  .got          ${RELOCATING-0} : { *(.got.plt) *(.got) }
     326  ${OTHER_GOT_SECTIONS}
    316327  ${CREATE_SHLIB+${SDATA2}}
    317328  ${CREATE_SHLIB+${SBSS2}}
    318   ${TEXT_DYNAMIC-${DYNAMIC}}
    319   /* We want the small data sections together, so single-instruction offsets
    320      can access them all, and initialized data all before uninitialized, so
    321      we can shorten the on-disk segment size.  */
    322   .sdata   ${RELOCATING-0} :
    323   {
    324     ${RELOCATING+${SDATA_START_SYMBOLS}}
    325     *(.sdata)
    326     ${RELOCATING+*(.sdata.*)}
    327     ${RELOCATING+*(.gnu.linkonce.s.*)}
    328   }
    329   ${RELOCATING+${OTHER_GOT_SECTIONS}}
     329  ${SDATA}
     330  ${OTHER_SDATA_SECTIONS}
    330331  ${RELOCATING+_edata = .;}
    331332  ${RELOCATING+PROVIDE (edata = .);}
    332333  ${RELOCATING+__bss_start = .;}
    333334  ${RELOCATING+${OTHER_BSS_SYMBOLS}}
    334   .sbss    ${RELOCATING-0} :
    335   {
    336     ${RELOCATING+PROVIDE (__sbss_start = .);}
    337     ${RELOCATING+PROVIDE (___sbss_start = .);}
    338     *(.dynsbss)
    339     *(.sbss)
    340     ${RELOCATING+*(.sbss.*)}
    341     ${RELOCATING+*(.gnu.linkonce.sb.*)}
    342     *(.scommon)
    343     ${RELOCATING+PROVIDE (__sbss_end = .);}
    344     ${RELOCATING+PROVIDE (___sbss_end = .);}
    345   }
     335  ${SBSS}
    346336  ${BSS_PLT+${PLT}}
    347   .bss     ${RELOCATING-0} :
     337  .bss          ${RELOCATING-0} :
    348338  {
    349339   *(.dynbss)
    350    *(.bss)
    351    ${RELOCATING+*(.bss.*)}
    352    ${RELOCATING+*(.gnu.linkonce.b.*)}
     340   *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
    353341   *(COMMON)
    354342   /* Align here to ensure that the .bss section occupies space up to
     
    357345   ${RELOCATING+. = ALIGN(${ALIGNMENT});}
    358346  }
    359   ${RELOCATING+${OTHER_BSS_SECTIONS}}
     347  ${OTHER_BSS_SECTIONS}
    360348  ${RELOCATING+. = ALIGN(${ALIGNMENT});}
    361349  ${RELOCATING+_end = .;}
    362350  ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
    363351  ${RELOCATING+PROVIDE (end = .);}
     352  ${RELOCATING+${DATA_SEGMENT_END}}
    364353
    365354  /* Stabs debugging sections.  */
    366   .stab 0 : { *(.stab) }
    367   .stabstr 0 : { *(.stabstr) }
    368   .stab.excl 0 : { *(.stab.excl) }
    369   .stab.exclstr 0 : { *(.stab.exclstr) }
    370   .stab.index 0 : { *(.stab.index) }
     355  .stab          0 : { *(.stab) }
     356  .stabstr       0 : { *(.stabstr) }
     357  .stab.excl     0 : { *(.stab.excl) }
     358  .stab.exclstr  0 : { *(.stab.exclstr) }
     359  .stab.index    0 : { *(.stab.index) }
    371360  .stab.indexstr 0 : { *(.stab.indexstr) }
    372361
    373   .comment 0 : { *(.comment) }
     362  .comment       0 : { *(.comment) }
    374363
    375364  /* DWARF debug sections.
     
    390379
    391380  /* DWARF 2 */
    392   .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
     381  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
    393382  .debug_abbrev   0 : { *(.debug_abbrev) }
    394383  .debug_line     0 : { *(.debug_line) }
     
    404393  .debug_varnames  0 : { *(.debug_varnames) }
    405394
    406   ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
    407 
    408   /* These must appear regardless of ${RELOCATING}.  */
     395  ${STACK_ADDR+${STACK}}
    409396  ${OTHER_SECTIONS}
     397  ${RELOCATING+${OTHER_END_SYMBOLS}}
    410398}
    411399EOF
  • branches/GNU/src/binutils/ld/scripttempl/elf32avr.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    66{
    77  text   (rx)   : ORIGIN = 0,    LENGTH = $TEXT_LENGTH
    8   data   (rw!x) : ORIGIN = 0x800060, LENGTH = $DATA_LENGTH
     8  data   (rw!x) : ORIGIN = (0x800000 + $DATA_START), LENGTH = $DATA_LENGTH
    99  eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = $EEPROM_LENGTH
    1010}
  • branches/GNU/src/binutils/ld/scripttempl/elfd10v.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2121       is in.  */
    2222
    23     KEEP (*crtbegin.o(.ctors))
     23    KEEP (*crtbegin*.o(.ctors))
    2424
    2525    /* We don't want to include the .ctor section from
     
    2828       end of ctors marker and it must be last */
    2929
    30     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
     30    KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
    3131    KEEP (*(SORT(.ctors.*)))
    3232    KEEP (*(.ctors))
     
    3737  {
    3838    ${CONSTRUCTING+${DTOR_START}}
    39     KEEP (*crtbegin.o(.dtors))
    40     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
     39    KEEP (*crtbegin*.o(.dtors))
     40    KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
    4141    KEEP (*(SORT(.dtors.*)))
    4242    KEEP (*(.dtors))
     
    6666MEMORY
    6767{
    68   UNIFIED : org = 0,         len = 0x1000000
    69   INSN    : org = 0x1000000, len = 0x40000
    70   DATA    : org = 0x2000004, len = 0x7FFC
    71   STACK   : org = 0x2007FFE, len = 4
     68  /* These are the values for the D10V-TS3 board.
     69     There are other memory regions available on
     70     the TS3 (eg ROM, FLASH, etc) but these are not
     71     used by this script.  */
     72     
     73  INSN       : org = 0x01000000, len = 256K
     74  DATA       : org = 0x02000000, len = 48K
     75
     76  /* This is a fake memory region at the top of the
     77     on-chip RAM, used as the start of the
     78     (descending) stack.  */
     79     
     80  STACK      : org = 0x0200BFFC, len = 4
    7281}
    7382
    7483SECTIONS
    7584{
    76   .text :
     85  .text ${RELOCATING+${TEXT_START_ADDR}} :
    7786  {
    7887    ${RELOCATING+${TEXT_START_SYMBOLS}}
    7988    KEEP (*(.init))
     89    KEEP (*(.init.*))
    8090    KEEP (*(.fini))
     91    KEEP (*(.fini.*))
    8192    *(.text)
    8293    *(.text.*)
     
    8899  } ${RELOCATING+ >INSN} =${NOP-0}
    89100
    90   .rodata  ${RELOCATING-0} : {
    91     *(.rodata) *(.gnu.linkonce.r*)
     101  .rodata ${RELOCATING+${READONLY_START_ADDR}} : {
     102    *(.rodata)
     103    *(.gnu.linkonce.r*)
     104    *(.rodata.*)
    92105  } ${RELOCATING+ >DATA}
    93   .rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+ >DATA}
     106
     107  .rodata1 ${RELOCATING-0} : {
     108    *(.rodata1)
     109    *(.rodata1.*)
     110   } ${RELOCATING+ >DATA}
    94111
    95112  .data  ${RELOCATING-0} :
     
    101118    ${CONSTRUCTING+CONSTRUCTORS}
    102119  } ${RELOCATING+ >DATA}
    103   .data1 ${RELOCATING-0} : { *(.data1) } ${RELOCATING+ >DATA}
     120
     121  .data1 ${RELOCATING-0} : {
     122    *(.data1)
     123    *(.data1.*)
     124  } ${RELOCATING+ >DATA}
     125
    104126  ${RELOCATING+${CTOR} >DATA}
    105127  ${RELOCATING+${DTOR} >DATA}
     
    108130     can access them all, and initialized data all before uninitialized, so
    109131     we can shorten the on-disk segment size.  */
    110   .sdata   ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ >DATA}
     132  .sdata   ${RELOCATING-0} : {
     133    *(.sdata)
     134    *(.sdata.*)
     135  } ${RELOCATING+ >DATA}
     136
    111137  ${RELOCATING+_edata = .;}
    112138  ${RELOCATING+PROVIDE (edata = .);}
     
    116142  {
    117143   *(.dynbss)
     144   *(.dynbss.*)
    118145   *(.bss)
     146   *(.bss.*)
    119147   *(COMMON)
    120148  } ${RELOCATING+ >DATA}
     149
    121150  ${RELOCATING+_end = . ;}
    122151  ${RELOCATING+PROVIDE (end = .);}
  • branches/GNU/src/binutils/ld/scripttempl/elfd30v.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1313       is in.  */
    1414
    15     KEEP (*crtbegin.o(.ctors))
     15    KEEP (*crtbegin*.o(.ctors))
    1616
    1717    /* We don't want to include the .ctor section from
     
    2020       end of ctors marker and it must be last */
    2121
    22     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
     22    KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
    2323    KEEP (*(SORT(.ctors.*)))
    2424    KEEP (*(.ctors))
     
    2929  {
    3030    ${CONSTRUCTING+ __DTOR_LIST__ = .; }
    31     KEEP (*crtbegin.o(.dtors))
    32     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
     31    KEEP (*crtbegin*.o(.dtors))
     32    KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
    3333    KEEP (*(SORT(.dtors.*)))
    3434    KEEP (*(.dtors))
     
    5959  .gnu.version_r        ${RELOCATING-0} : { *(.gnu.version_r) }
    6060
     61  .rel.text             ${RELOCATING-0} : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
    6162  .rela.text            ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
     63  .rel.data             ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
    6264  .rela.data            ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
     65  .rel.rodata           ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
    6366  .rela.rodata          ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
     67  .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    6468  .rela.stext           ${RELOCATING-0} : { *(.rela.stest) }
     69  .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    6570  .rela.etext           ${RELOCATING-0} : { *(.rela.etest) }
     71  .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    6672  .rela.sdata           ${RELOCATING-0} : { *(.rela.sdata) }
     73  .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    6774  .rela.edata           ${RELOCATING-0} : { *(.rela.edata) }
     75  .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    6876  .rela.eit_v           ${RELOCATING-0} : { *(.rela.eit_v) }
     77  .rel.sbss             ${RELOCATING-0} : { *(.rel.sbss) }
    6978  .rela.sbss            ${RELOCATING-0} : { *(.rela.sbss) }
     79  .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    7080  .rela.ebss            ${RELOCATING-0} : { *(.rela.ebss) }
     81  .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    7182  .rela.srodata         ${RELOCATING-0} : { *(.rela.srodata) }
     83  .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    7284  .rela.erodata         ${RELOCATING-0} : { *(.rela.erodata) }
     85  .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    7386  .rela.got             ${RELOCATING-0} : { *(.rela.got) }
     87  .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    7488  .rela.ctors           ${RELOCATING-0} : { *(.rela.ctors) }
     89  .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    7590  .rela.dtors           ${RELOCATING-0} : { *(.rela.dtors) }
     91  .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    7692  .rela.init            ${RELOCATING-0} : { *(.rela.init) }
     93  .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    7794  .rela.fini            ${RELOCATING-0} : { *(.rela.fini) }
     95  .rel.bss              ${RELOCATING-0} : { *(.rel.bss) }
    7896  .rela.bss             ${RELOCATING-0} : { *(.rela.bss) }
     97  .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    7998  .rela.plt             ${RELOCATING-0} : { *(.rela.plt) }
    80 
    81   .rel.data             ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
    82   .rel.rodata           ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
    83   .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    84   .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    85   .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    86   .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    87   .rel.sbss             ${RELOCATING-0} : { *(.rel.sbss) }
    88   .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    89   .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    90   .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    91   .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    92   .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    93   .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    94   .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    95   .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    96   .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    97   .rel.bss              ${RELOCATING-0} : { *(.rel.bss) }
    98   .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    9999
    100100  .init                 ${RELOCATING-0} : { *(.init) } =${NOP-0}
     
    124124  .eh_frame     ${RELOCATING-0} : { KEEP (*(.eh_frame)) }       ${RELOCATING+ > ${DATA_MEMORY}}
    125125  .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }  ${RELOCATING+ > ${DATA_MEMORY}}
     126
     127  /* Java class registration support.  */
     128  .jcr          ${RELOCATING-0} : { KEEP (*(.jcr)) }    ${RELOCATING+ >${DATA_MEMORY}}
    126129
    127130  ${RELOCATING+${CTOR}}
  • branches/GNU/src/binutils/ld/scripttempl/elfi370.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33#
    44# Unusual variables checked by this code:
    5 #       NOP - two byte opcode for no-op (defaults to 0)
     5#       NOP - four byte opcode for no-op (defaults to 0)
    66#       DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
    77#       OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
     
    9393  ${CREATE_SHLIB-${SDATA2}}
    9494  ${CREATE_SHLIB-${SBSS2}}
    95   ${RELOCATING+${OTHER_READONLY_SECTIONS}}
     95  ${OTHER_READONLY_SECTIONS}
    9696
    9797  /* Adjust the address for the data segment.  We want to adjust up to
     
    119119  }
    120120  .data1 ${RELOCATING-0} : { *(.data1) }
    121   ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
     121  ${OTHER_READWRITE_SECTIONS}
    122122
    123123  .got1         ${RELOCATING-0} : { *(.got1) }
     
    213213  .debug_varnames  0 : { *(.debug_varnames) }
    214214
    215   /* These must appear regardless of ${RELOCATING}.  */
    216215  ${OTHER_SECTIONS}
    217216}
  • branches/GNU/src/binutils/ld/scripttempl/elfm68hc11.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#
    22# Unusual variables checked by this code:
    3 #       NOP - two byte opcode for no-op (defaults to 0)
     3#       NOP - four byte opcode for no-op (defaults to 0)
    44#       DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
    55#       OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
     
    2727CTOR=".ctors ${CONSTRUCTING-0} :
    2828  {
    29     ${CONSTRUCTING+ __CTOR_LIST__ = .; }
     29    ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
    3030    ${CONSTRUCTING+${CTOR_START}}
    3131    *(.ctors)
     
    4040
    4141    ${CONSTRUCTING+${CTOR_END}}
    42     ${CONSTRUCTING+ __CTOR_END__ = .; }
    43   } ${RELOCATING+ > ${DATA_MEMORY}}"
     42    ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); }
     43  } ${RELOCATING+ > ${TEXT_MEMORY}}"
    4444
    4545DTOR="  .dtors  ${CONSTRUCTING-0} :
    4646  {
    47     ${CONSTRUCTING+ __DTOR_LIST__ = .; }
     47    ${CONSTRUCTING+ PROVIDE(__DTOR_LIST__ = .); }
    4848    *(.dtors)
    4949    /*
     
    5252    KEEP (*(SORT(.dtors.*)))
    5353    KEEP (*(.dtors)) */
    54     ${CONSTRUCTING+ __DTOR_END__ = .; }
    55   } ${RELOCATING+ > ${DATA_MEMORY}}"
     54    ${CONSTRUCTING+ PROVIDE(__DTOR_END__ = .); }
     55  } ${RELOCATING+ > ${TEXT_MEMORY}}"
    5656
    5757
     
    7676  .vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 :
    7777  {
    78     *(.vectors)
     78    KEEP (*(.vectors))
    7979  }"
    8080
     
    101101  text  (rx)  : ORIGIN = ${ROM_START_ADDR}, LENGTH = ${ROM_SIZE}
    102102  data        : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
     103  eeprom      : ORIGIN = ${EEPROM_START_ADDR}, LENGTH = ${EEPROM_SIZE}
    103104}
    104105
     
    111112STARTUP_CODE="
    112113    /* Startup code.  */
    113     *(.install0)        /* Section should setup the stack pointer.  */
    114     *(.install1)        /* Place holder for applications.  */
    115     *(.install2)        /* Optional installation of data sections in RAM.  */
    116     *(.install3)        /* Place holder for applications.  */
    117     *(.install4)        /* Section that calls the main.  */
     114    KEEP (*(.install0)) /* Section should setup the stack pointer.  */
     115    KEEP (*(.install1)) /* Place holder for applications.  */
     116    KEEP (*(.install2)) /* Optional installation of data sections in RAM.  */
     117    KEEP (*(.install3)) /* Place holder for applications.  */
     118    KEEP (*(.install4)) /* Section that calls the main.  */
     119"
     120
     121FINISH_CODE="
     122    /* Finish code.  */
     123    KEEP (*(.fini0))    /* Beginning of finish code (_exit symbol).  */
     124    KEEP (*(.fini1))    /* Place holder for applications.  */
     125    KEEP (*(.fini2))    /* C++ destructors.  */
     126    KEEP (*(.fini3))    /* Place holder for applications.  */
     127    KEEP (*(.fini4))    /* Runtime exit.  */
    118128"
    119129
     
    138148"
    139149
     150FINISH_RELOC="
     151  .fini0 0 : { *(.fini0) }
     152  .fini1 0 : { *(.fini1) }
     153  .fini2 0 : { *(.fini2) }
     154  .fini3 0 : { *(.fini3) }
     155  .fini4 0 : { *(.fini4) }
     156"
     157
    140158BSS_DATA_RELOC="
    141159  .data1 0 : { *(.data1) }
     
    147165  .sbss    0 : { *(.sbss) }
    148166  .scommon 0 : { *(.scommon) }
     167"
     168
     169SOFT_REGS_RELOC="
     170  .softregs 0 : { *(.softregs) }
    149171"
    150172
     
    171193  .gnu.version_r        ${RELOCATING-0} : { *(.gnu.version_r) }
    172194
    173   .rela.text            ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
    174   .rela.data            ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
    175   .rela.rodata          ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
     195  .rel.text    ${RELOCATING-0} :
     196    {
     197      *(.rel.text)
     198      ${RELOCATING+*(.rel.text.*)}
     199      ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
     200    }
     201  .rela.text   ${RELOCATING-0} :
     202    {
     203      *(.rela.text)
     204      ${RELOCATING+*(.rela.text.*)}
     205      ${RELOCATING+*(.rela.gnu.linkonce.t.*)}
     206    }
     207  .rel.data    ${RELOCATING-0} :
     208    {
     209      *(.rel.data)
     210      ${RELOCATING+*(.rel.data.*)}
     211      ${RELOCATING+*(.rel.gnu.linkonce.d.*)}
     212    }
     213  .rela.data   ${RELOCATING-0} :
     214    {
     215      *(.rela.data)
     216      ${RELOCATING+*(.rela.data.*)}
     217      ${RELOCATING+*(.rela.gnu.linkonce.d.*)}
     218    }
     219  .rel.rodata  ${RELOCATING-0} :
     220    {
     221      *(.rel.rodata)
     222      ${RELOCATING+*(.rel.rodata.*)}
     223      ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
     224    }
     225  .rela.rodata ${RELOCATING-0} :
     226    {
     227      *(.rela.rodata)
     228      ${RELOCATING+*(.rela.rodata.*)}
     229      ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
     230    }
     231  .rel.sdata   ${RELOCATING-0} :
     232    {
     233      *(.rel.sdata)
     234      ${RELOCATING+*(.rel.sdata.*)}
     235      ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
     236    }
     237  .rela.sdata   ${RELOCATING-0} :
     238    {
     239      *(.rela.sdata)
     240      ${RELOCATING+*(.rela.sdata.*)}
     241      ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
     242    }
     243  .rel.sbss    ${RELOCATING-0} :
     244    {
     245      *(.rel.sbss)
     246      ${RELOCATING+*(.rel.sbss.*)}
     247      ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
     248    }
     249  .rela.sbss   ${RELOCATING-0} :
     250    {
     251      *(.rela.sbss)
     252      ${RELOCATING+*(.rela.sbss.*)}
     253      ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
     254    }
     255  .rel.bss     ${RELOCATING-0} :
     256    {
     257      *(.rel.bss)
     258      ${RELOCATING+*(.rel.bss.*)}
     259      ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
     260    }
     261  .rela.bss    ${RELOCATING-0} :
     262    {
     263      *(.rela.bss)
     264      ${RELOCATING+*(.rela.bss.*)}
     265      ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
     266    }
     267  .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    176268  .rela.stext           ${RELOCATING-0} : { *(.rela.stest) }
     269  .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    177270  .rela.etext           ${RELOCATING-0} : { *(.rela.etest) }
     271  .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    178272  .rela.sdata           ${RELOCATING-0} : { *(.rela.sdata) }
     273  .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    179274  .rela.edata           ${RELOCATING-0} : { *(.rela.edata) }
     275  .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    180276  .rela.eit_v           ${RELOCATING-0} : { *(.rela.eit_v) }
    181   .rela.sbss            ${RELOCATING-0} : { *(.rela.sbss) }
     277  .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    182278  .rela.ebss            ${RELOCATING-0} : { *(.rela.ebss) }
     279  .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    183280  .rela.srodata         ${RELOCATING-0} : { *(.rela.srodata) }
     281  .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    184282  .rela.erodata         ${RELOCATING-0} : { *(.rela.erodata) }
     283  .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    185284  .rela.got             ${RELOCATING-0} : { *(.rela.got) }
     285  .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    186286  .rela.ctors           ${RELOCATING-0} : { *(.rela.ctors) }
     287  .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    187288  .rela.dtors           ${RELOCATING-0} : { *(.rela.dtors) }
     289  .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    188290  .rela.init            ${RELOCATING-0} : { *(.rela.init) }
     291  .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    189292  .rela.fini            ${RELOCATING-0} : { *(.rela.fini) }
    190   .rela.bss             ${RELOCATING-0} : { *(.rela.bss) }
     293  .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    191294  .rela.plt             ${RELOCATING-0} : { *(.rela.plt) }
    192 
    193   .rel.data             ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
    194   .rel.rodata           ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
    195   .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    196   .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    197   .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    198   .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    199   .rel.sbss             ${RELOCATING-0} : { *(.rel.sbss) }
    200   .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    201   .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    202   .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    203   .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    204   .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    205   .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    206   .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    207   .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    208   .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    209   .rel.bss              ${RELOCATING-0} : { *(.rel.bss) }
    210   .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    211295
    212296  /* Concatenate .page0 sections.  Put them in the page0 memory bank
     
    215299  {
    216300    *(.page0)
     301    ${RELOCATING+*(.softregs)}
    217302  } ${RELOCATING+ > page0}
    218303
     
    229314
    230315  ${RELOCATING-${INSTALL_RELOC}}
     316  ${RELOCATING-${FINISH_RELOC}}
    231317
    232318  .text ${RELOCATING-0}:
     
    237323    ${RELOCATING+*(.init)}
    238324    *(.text)
    239     *(.fini)
     325    ${RELOCATING+*(.text.*)}
    240326    /* .gnu.warning sections are handled specially by elf32.em.  */
    241327    *(.gnu.warning)
    242     *(.gnu.linkonce.t*)
     328    ${RELOCATING+*(.gnu.linkonce.t.*)}
     329
     330    ${RELOCATING+${FINISH_CODE}}
    243331
    244332    ${RELOCATING+_etext = .;}
     
    249337  .eh_frame ${RELOCATING-0} :
    250338  {
    251     *(.eh_frame)
     339    KEEP (*(.eh_frame))
    252340  } ${RELOCATING+ > ${TEXT_MEMORY}}
    253341
     
    255343  {
    256344    *(.rodata)
    257     *(.gnu.linkonce.r*)
     345    ${RELOCATING+*(.rodata.*)}
     346    ${RELOCATING+*(.gnu.linkonce.r*)}
    258347  } ${RELOCATING+ > ${TEXT_MEMORY}}
    259348
     
    261350  {
    262351    *(.rodata1)
     352  } ${RELOCATING+ > ${TEXT_MEMORY}}
     353
     354  /* Constructor and destructor tables are in ROM.  */
     355  ${RELOCATING+${CTOR}}
     356  ${RELOCATING+${DTOR}}
     357
     358  .jcr ${RELOCATING-0} :
     359  {
     360    KEEP (*(.jcr))
    263361  } ${RELOCATING+ > ${TEXT_MEMORY}}
    264362
     
    279377    ${RELOCATING+*(.sdata)}
    280378    *(.data)
     379    ${RELOCATING+*(.data.*)}
    281380    ${RELOCATING+*(.data1)}
    282     *(.gnu.linkonce.d*)
     381    ${RELOCATING+*(.gnu.linkonce.d.*)}
    283382    ${CONSTRUCTING+CONSTRUCTORS}
    284383
     
    300399  /* Relocation for some bss and data sections.  */
    301400  ${RELOCATING-${BSS_DATA_RELOC}}
     401  ${RELOCATING-${SOFT_REGS_RELOC}}
    302402
    303403  .bss ${RELOCATING-0} :
     
    309409    *(.dynbss)
    310410    *(.bss)
     411    ${RELOCATING+*(.bss.*)}
     412    ${RELOCATING+*(.gnu.linkonce.b.*)}
    311413    *(COMMON)
    312414    ${RELOCATING+PROVIDE (_end = .);}
     
    315417  ${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));}
    316418
    317   ${RELOCATING+${CTOR}}
    318   ${RELOCATING+${DTOR}}
     419  .eeprom ${RELOCATING-0} :
     420  {
     421    *(.eeprom)
     422    *(.eeprom.*)
     423  } ${RELOCATING+ > ${EEPROM_MEMORY}}
    319424
    320425  ${RELOCATING+${VECTORS}}
  • branches/GNU/src/binutils/ld/scripttempl/elfm68hc12.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#
    22# Unusual variables checked by this code:
    3 #       NOP - two byte opcode for no-op (defaults to 0)
     3#       NOP - four byte opcode for no-op (defaults to 0)
    44#       DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
    55#       OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
     
    2727CTOR=".ctors ${CONSTRUCTING-0} :
    2828  {
    29     ${CONSTRUCTING+ __CTOR_LIST__ = .; }
     29    ${CONSTRUCTING+ PROVIDE (__CTOR_LIST__ = .); }
    3030    ${CONSTRUCTING+${CTOR_START}}
    3131    *(.ctors)
     
    4040
    4141    ${CONSTRUCTING+${CTOR_END}}
    42     ${CONSTRUCTING+ __CTOR_END__ = .; }
    43   } ${RELOCATING+ > ${DATA_MEMORY}}"
     42    ${CONSTRUCTING+ PROVIDE(__CTOR_END__ = .); }
     43  } ${RELOCATING+ > ${TEXT_MEMORY}}"
    4444
    4545DTOR="  .dtors  ${CONSTRUCTING-0} :
    4646  {
    47     ${CONSTRUCTING+ __DTOR_LIST__ = .; }
     47    ${CONSTRUCTING+ PROVIDE(__DTOR_LIST__ = .); }
    4848    *(.dtors)
    4949    /*
     
    5252    KEEP (*(SORT(.dtors.*)))
    5353    KEEP (*(.dtors)) */
    54     ${CONSTRUCTING+ __DTOR_END__ = .; }
    55   } ${RELOCATING+ > ${DATA_MEMORY}}"
     54    ${CONSTRUCTING+ PROVIDE(__DTOR_END__ = .); }
     55  } ${RELOCATING+ > ${TEXT_MEMORY}}"
    5656
    5757
     
    7676  .vectors DEFINED (vectors_addr) ? vectors_addr : 0xffc0 :
    7777  {
    78     *(.vectors)
     78    KEEP (*(.vectors))
    7979  }"
    8080
     
    111111STARTUP_CODE="
    112112    /* Startup code.  */
    113     *(.install0)        /* Section should setup the stack pointer.  */
    114     *(.install1)        /* Place holder for applications.  */
    115     *(.install2)        /* Optional installation of data sections in RAM.  */
    116     *(.install3)        /* Place holder for applications.  */
    117     *(.install4)        /* Section that calls the main.  */
     113    KEEP (*(.install0)) /* Section should setup the stack pointer.  */
     114    KEEP (*(.install1)) /* Place holder for applications.  */
     115    KEEP (*(.install2)) /* Optional installation of data sections in RAM.  */
     116    KEEP (*(.install3)) /* Place holder for applications.  */
     117    KEEP (*(.install4)) /* Section that calls the main.  */
     118"
     119
     120FINISH_CODE="
     121    /* Finish code.  */
     122    KEEP (*(.fini0))    /* Beginning of finish code (_exit symbol).  */
     123    KEEP (*(.fini1))    /* Place holder for applications.  */
     124    KEEP (*(.fini2))    /* C++ destructors.  */
     125    KEEP (*(.fini3))    /* Place holder for applications.  */
     126    KEEP (*(.fini4))    /* Runtime exit.  */
    118127"
    119128
     
    138147"
    139148
     149FINISH_RELOC="
     150  .fini0 0 : { *(.fini0) }
     151  .fini1 0 : { *(.fini1) }
     152  .fini2 0 : { *(.fini2) }
     153  .fini3 0 : { *(.fini3) }
     154  .fini4 0 : { *(.fini4) }
     155"
     156
    140157BSS_DATA_RELOC="
    141158  .data1 0 : { *(.data1) }
     
    147164  .sbss    0 : { *(.sbss) }
    148165  .scommon 0 : { *(.scommon) }
     166"
     167
     168SOFT_REGS_RELOC="
     169  .softregs 0 : { *(.softregs) }
    149170"
    150171
     
    171192  .gnu.version_r        ${RELOCATING-0} : { *(.gnu.version_r) }
    172193
    173   .rela.text            ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
    174   .rela.data            ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
    175   .rela.rodata          ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
     194  .rel.text    ${RELOCATING-0} :
     195    {
     196      *(.rel.text)
     197      ${RELOCATING+*(.rel.text.*)}
     198      ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
     199    }
     200  .rela.text   ${RELOCATING-0} :
     201    {
     202      *(.rela.text)
     203      ${RELOCATING+*(.rela.text.*)}
     204      ${RELOCATING+*(.rela.gnu.linkonce.t.*)}
     205    }
     206  .rel.data    ${RELOCATING-0} :
     207    {
     208      *(.rel.data)
     209      ${RELOCATING+*(.rel.data.*)}
     210      ${RELOCATING+*(.rel.gnu.linkonce.d.*)}
     211    }
     212  .rela.data   ${RELOCATING-0} :
     213    {
     214      *(.rela.data)
     215      ${RELOCATING+*(.rela.data.*)}
     216      ${RELOCATING+*(.rela.gnu.linkonce.d.*)}
     217    }
     218  .rel.rodata  ${RELOCATING-0} :
     219    {
     220      *(.rel.rodata)
     221      ${RELOCATING+*(.rel.rodata.*)}
     222      ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
     223    }
     224  .rela.rodata ${RELOCATING-0} :
     225    {
     226      *(.rela.rodata)
     227      ${RELOCATING+*(.rela.rodata.*)}
     228      ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
     229    }
     230  .rel.sdata   ${RELOCATING-0} :
     231    {
     232      *(.rel.sdata)
     233      ${RELOCATING+*(.rel.sdata.*)}
     234      ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
     235    }
     236  .rela.sdata   ${RELOCATING-0} :
     237    {
     238      *(.rela.sdata)
     239      ${RELOCATING+*(.rela.sdata.*)}
     240      ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
     241    }
     242  .rel.sbss    ${RELOCATING-0} :
     243    {
     244      *(.rel.sbss)
     245      ${RELOCATING+*(.rel.sbss.*)}
     246      ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
     247    }
     248  .rela.sbss   ${RELOCATING-0} :
     249    {
     250      *(.rela.sbss)
     251      ${RELOCATING+*(.rela.sbss.*)}
     252      ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
     253    }
     254  .rel.bss     ${RELOCATING-0} :
     255    {
     256      *(.rel.bss)
     257      ${RELOCATING+*(.rel.bss.*)}
     258      ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
     259    }
     260  .rela.bss    ${RELOCATING-0} :
     261    {
     262      *(.rela.bss)
     263      ${RELOCATING+*(.rela.bss.*)}
     264      ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
     265    }
     266  .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    176267  .rela.stext           ${RELOCATING-0} : { *(.rela.stest) }
     268  .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    177269  .rela.etext           ${RELOCATING-0} : { *(.rela.etest) }
     270  .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    178271  .rela.sdata           ${RELOCATING-0} : { *(.rela.sdata) }
     272  .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    179273  .rela.edata           ${RELOCATING-0} : { *(.rela.edata) }
     274  .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    180275  .rela.eit_v           ${RELOCATING-0} : { *(.rela.eit_v) }
    181   .rela.sbss            ${RELOCATING-0} : { *(.rela.sbss) }
     276  .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    182277  .rela.ebss            ${RELOCATING-0} : { *(.rela.ebss) }
     278  .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    183279  .rela.srodata         ${RELOCATING-0} : { *(.rela.srodata) }
     280  .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    184281  .rela.erodata         ${RELOCATING-0} : { *(.rela.erodata) }
     282  .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    185283  .rela.got             ${RELOCATING-0} : { *(.rela.got) }
     284  .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    186285  .rela.ctors           ${RELOCATING-0} : { *(.rela.ctors) }
     286  .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    187287  .rela.dtors           ${RELOCATING-0} : { *(.rela.dtors) }
     288  .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    188289  .rela.init            ${RELOCATING-0} : { *(.rela.init) }
     290  .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    189291  .rela.fini            ${RELOCATING-0} : { *(.rela.fini) }
    190   .rela.bss             ${RELOCATING-0} : { *(.rela.bss) }
     292  .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    191293  .rela.plt             ${RELOCATING-0} : { *(.rela.plt) }
    192 
    193   .rel.data             ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
    194   .rel.rodata           ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
    195   .rel.stext            ${RELOCATING-0} : { *(.rel.stest) }
    196   .rel.etext            ${RELOCATING-0} : { *(.rel.etest) }
    197   .rel.sdata            ${RELOCATING-0} : { *(.rel.sdata) }
    198   .rel.edata            ${RELOCATING-0} : { *(.rel.edata) }
    199   .rel.sbss             ${RELOCATING-0} : { *(.rel.sbss) }
    200   .rel.ebss             ${RELOCATING-0} : { *(.rel.ebss) }
    201   .rel.eit_v            ${RELOCATING-0} : { *(.rel.eit_v) }
    202   .rel.srodata          ${RELOCATING-0} : { *(.rel.srodata) }
    203   .rel.erodata          ${RELOCATING-0} : { *(.rel.erodata) }
    204   .rel.got              ${RELOCATING-0} : { *(.rel.got) }
    205   .rel.ctors            ${RELOCATING-0} : { *(.rel.ctors) }
    206   .rel.dtors            ${RELOCATING-0} : { *(.rel.dtors) }
    207   .rel.init             ${RELOCATING-0} : { *(.rel.init) }
    208   .rel.fini             ${RELOCATING-0} : { *(.rel.fini) }
    209   .rel.bss              ${RELOCATING-0} : { *(.rel.bss) }
    210   .rel.plt              ${RELOCATING-0} : { *(.rel.plt) }
    211294
    212295  /* Concatenate .page0 sections.  Put them in the page0 memory bank
     
    229312
    230313  ${RELOCATING-${INSTALL_RELOC}}
     314  ${RELOCATING-${FINISH_RELOC}}
    231315
    232316  .text ${RELOCATING-0}:
     
    237321    ${RELOCATING+*(.init)}
    238322    *(.text)
    239     *(.fini)
     323    ${RELOCATING+*(.text.*)}
    240324    /* .gnu.warning sections are handled specially by elf32.em.  */
    241325    *(.gnu.warning)
    242     *(.gnu.linkonce.t*)
     326    ${RELOCATING+*(.gnu.linkonce.t.*)}
     327
     328    ${RELOCATING+${FINISH_CODE}}
    243329
    244330    ${RELOCATING+_etext = .;}
     
    249335  .eh_frame ${RELOCATING-0} :
    250336  {
    251     *(.eh_frame)
     337    KEEP (*(.eh_frame))
    252338  } ${RELOCATING+ > ${TEXT_MEMORY}}
    253339
     
    255341  {
    256342    *(.rodata)
    257     *(.gnu.linkonce.r*)
     343    ${RELOCATING+*(.rodata.*)}
     344    ${RELOCATING+*(.gnu.linkonce.r*)}
    258345  } ${RELOCATING+ > ${TEXT_MEMORY}}
    259346
     
    261348  {
    262349    *(.rodata1)
     350  } ${RELOCATING+ > ${TEXT_MEMORY}}
     351
     352  /* Constructor and destructor tables are in ROM.  */
     353  ${RELOCATING+${CTOR}}
     354  ${RELOCATING+${DTOR}}
     355
     356  .jcr ${RELOCATING-0} :
     357  {
     358    KEEP (*(.jcr))
    263359  } ${RELOCATING+ > ${TEXT_MEMORY}}
    264360
     
    279375    ${RELOCATING+*(.sdata)}
    280376    *(.data)
     377    ${RELOCATING+*(.data.*)}
    281378    ${RELOCATING+*(.data1)}
    282     *(.gnu.linkonce.d*)
     379    ${RELOCATING+*(.gnu.linkonce.d.*)}
    283380    ${CONSTRUCTING+CONSTRUCTORS}
    284381
     
    300397  /* Relocation for some bss and data sections.  */
    301398  ${RELOCATING-${BSS_DATA_RELOC}}
     399  ${RELOCATING-${SOFT_REGS_RELOC}}
    302400
    303401  .bss ${RELOCATING-0} :
    304402  {
    305403    ${RELOCATING+__bss_start = .;}
     404    ${RELOCATING+*(.softregs)}
    306405    ${RELOCATING+*(.sbss)}
    307406    ${RELOCATING+*(.scommon)}
     
    309408    *(.dynbss)
    310409    *(.bss)
     410    ${RELOCATING+*(.bss.*)}
     411    ${RELOCATING+*(.gnu.linkonce.b.*)}
    311412    *(COMMON)
    312413    ${RELOCATING+PROVIDE (_end = .);}
     
    315416  ${RELOCATING+PROVIDE (__bss_size = SIZEOF(.bss));}
    316417
    317   ${RELOCATING+${CTOR}}
    318   ${RELOCATING+${DTOR}}
     418  .eeprom ${RELOCATING-0} :
     419  {
     420    *(.eeprom)
     421    *(.eeprom.*)
     422  } ${RELOCATING+ > ${EEPROM_MEMORY}}
    319423
    320424  ${RELOCATING+${VECTORS}}
  • branches/GNU/src/binutils/ld/scripttempl/h8300.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3939        } ${RELOCATING+ > vectors}
    4040
     41.init :
     42        {
     43          *(.init)
     44        } ${RELOCATING+ > ram}
     45
    4146.text :
    4247        {
    4348          *(.rodata)
    4449          *(.text)
     50          *(.text.*)
    4551          *(.strings)
    4652          ${RELOCATING+ _etext = . ; }
     
    5258        {
    5359          *(.data)
     60          *(.data.*)
    5461          *(.tiny)
    5562          ${RELOCATING+ _edata = . ; }
  • branches/GNU/src/binutils/ld/scripttempl/i386go32.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2424  .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
    2525    *(.text)
     26    ${RELOCATING+*(.text.*)}
    2627    ${RELOCATING+*(.gnu.linkonce.t*)}
    2728    *(.const*)
     
    4142    djgpp_last_dtor = . ;}
    4243    *(.data)
     44    ${RELOCATING+*(.data.*)}
    4345
    4446    ${RELOCATING+*(.gcc_exc*)}
     
    5658  .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
    5759  {                                     
    58     *(.bss)
     60    *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
    5961    *(COMMON)
    6062    ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
    6163    ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
    6264  }
     65  /* Stabs debugging sections.  */
     66  .stab 0 : { *(.stab) }
     67  .stabstr 0 : { *(.stabstr) }
    6368  /* DWARF 2 */
    6469  .debug_aranges  0 : { *(.debug_aranges) }
  • branches/GNU/src/binutils/ld/scripttempl/nw.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11#
    22# Unusual variables checked by this code:
    3 #       NOP - two byte opcode for no-op (defaults to 0)
     3#       NOP - four byte opcode for no-op (defaults to 0)
    44#       DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
    55#       OTHER_READONLY_SECTIONS - other than .text .init .ctors .rodata ...
     
    8888  .rodata  ${RELOCATING-0} : { *(.rodata)  }
    8989  .rodata1 ${RELOCATING-0} : { *(.rodata1) }
    90   ${RELOCATING+${OTHER_READONLY_SECTIONS}}
     90  ${OTHER_READONLY_SECTIONS}
    9191
    9292  /* Read-write section, merged into data segment: */
     
    9999  }
    100100  .data1 ${RELOCATING-0} : { *(.data1) }
    101   ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
     101  ${OTHER_READWRITE_SECTIONS}
    102102  .got         ${RELOCATING-0} : { *(.got.plt) *(.got) }
    103103  .dynamic     ${RELOCATING-0} : { *(.dynamic) }
     
    126126  .stabstr 0 : { *(.stabstr) }
    127127
    128   /* These must appear regardless of ${RELOCATING}.  */
    129128  ${OTHER_SECTIONS}
    130129}
  • branches/GNU/src/binutils/ld/scripttempl/pe.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    5555    *(.glue_7)
    5656    ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
    57                         LONG (-1); *(.ctors); *(.ctor); LONG (0); }
     57                        LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); }
    5858    ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
    59                         LONG (-1); *(.dtors); *(.dtor);  LONG (0); }
     59                        LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor);  LONG (0); }
    6060    ${RELOCATING+ *(.fini)}
    6161    /* ??? Why is .gcc_exc here?  */
    6262    ${RELOCATING+ *(.gcc_exc)}
    63     ${RELOCATING+ etext = .;}
     63    ${RELOCATING+PROVIDE (etext = .);}
    6464    *(.gcc_except_table)
    6565  }
     
    8686    ${R_RDATA}
    8787    *(.eh_frame)
     88    ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
     89    ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
     90    *(.rdata_runtime_pseudo_reloc)
     91    ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
     92    ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
    8893  }
    8994
     
    128133  {
    129134    /* end is deprecated, don't use it */
    130     ${RELOCATING+ end = .;}
    131     ${RELOCATING+ _end = .;}
     135    ${RELOCATING+PROVIDE (end = .);}
     136    ${RELOCATING+PROVIDE ( _end = .);}
    132137    ${RELOCATING+ __end__ = .;}
    133138  }
  • branches/GNU/src/binutils/ld/scripttempl/sh.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    3030  {
    3131    *(.data)
     32    ${RELOCATING+*(.gcc_exc*)}
     33    ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
     34    ${RELOCATING+*(.eh_fram*)}
     35    ${RELOCATING+___EH_FRAME_END__ = . ;}
     36    ${RELOCATING+LONG(0);}
    3237    ${RELOCATING+ _edata = . ; }
    3338  } ${RELOCATING+ > ram}
  • branches/GNU/src/binutils/ld/scripttempl/v850.sc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    55ENTRY(_start)
    66SEARCH_DIR(.);
     7EXTERN(__ctbp __ep __gp);
    78SECTIONS
    89{
     
    4344  .rel.rodata   : { *(.rel.rodata) }
    4445  .rela.rodata  : { *(.rela.rodata) }
     46  .rel.gcc_except_table : { *(.rel.gcc_except_table) }
     47  .rela.gcc_except_table : { *(.rela.gcc_except_table) }
    4548  .rel.got      : { *(.rel.got) }
    4649  .rela.got     : { *(.rela.got) }
     
    116119    ${CONSTRUCTING+___dtors_end = .;}
    117120  }
     121  .jcr          :
     122  {
     123    KEEP (*(.jcr))
     124  }
     125
     126  .gcc_except_table : { *(.gcc_except_table) }
    118127
    119128  .got          : { *(.got.plt) *(.got) }
Note: See TracChangeset for help on using the changeset viewer.