Only provide ENTRY on final link.
authorAlan Modra <amodra@gmail.com>
Wed, 9 Sep 2009 11:59:14 +0000 (11:59 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 9 Sep 2009 11:59:14 +0000 (11:59 +0000)
36 files changed:
ld/ChangeLog
ld/scripttempl/aix.sc
ld/scripttempl/alpha.sc
ld/scripttempl/armcoff.sc
ld/scripttempl/crisaout.sc
ld/scripttempl/delta68.sc
ld/scripttempl/ebmon29k.sc
ld/scripttempl/elf32xc16x.sc
ld/scripttempl/elf32xc16xl.sc
ld/scripttempl/elfmicroblaze.sc
ld/scripttempl/epocpe.sc
ld/scripttempl/h8300.sc
ld/scripttempl/h8300h.sc
ld/scripttempl/h8300hn.sc
ld/scripttempl/h8300s.sc
ld/scripttempl/h8300sn.sc
ld/scripttempl/h8300sx.sc
ld/scripttempl/h8300sxn.sc
ld/scripttempl/hppaelf.sc
ld/scripttempl/i386beos.sc
ld/scripttempl/i386coff.sc
ld/scripttempl/i386go32.sc
ld/scripttempl/m68kaux.sc
ld/scripttempl/m68klynx.sc
ld/scripttempl/m88kbcs.sc
ld/scripttempl/maxqcoff.sc
ld/scripttempl/mcorepe.sc
ld/scripttempl/mips.sc
ld/scripttempl/ppcpe.sc
ld/scripttempl/sa29200.sc
ld/scripttempl/sparccoff.sc
ld/scripttempl/sparclynx.sc
ld/scripttempl/tic4xcoff.sc
ld/scripttempl/tic54xcoff.sc
ld/scripttempl/tic80coff.sc
ld/scripttempl/z8000.sc

index cfde96c..721ba25 100644 (file)
@@ -1,3 +1,41 @@
+2009-09-09  Alan Modra  <amodra@bigpond.net.au>
+
+       * scripttempl/aix.sc: Only provide ENTRY on final link.
+       * scripttempl/alpha.sc: Likewise.
+       * scripttempl/armcoff.sc: Likewise.
+       * scripttempl/crisaout.sc: Likewise.
+       * scripttempl/delta68.sc: Likewise.
+       * scripttempl/ebmon29k.sc: Likewise.
+       * scripttempl/elf32xc16x.sc: Likewise.
+       * scripttempl/elf32xc16xl.sc: Likewise.
+       * scripttempl/elfmicroblaze.sc: Likewise.
+       * scripttempl/epocpe.sc: Likewise.
+       * scripttempl/h8300.sc: Likewise.
+       * scripttempl/h8300h.sc: Likewise.
+       * scripttempl/h8300hn.sc: Likewise.
+       * scripttempl/h8300s.sc: Likewise.
+       * scripttempl/h8300sn.sc: Likewise.
+       * scripttempl/h8300sx.sc: Likewise.
+       * scripttempl/h8300sxn.sc: Likewise.
+       * scripttempl/hppaelf.sc: Likewise.
+       * scripttempl/i386beos.sc: Likewise.
+       * scripttempl/i386coff.sc: Likewise.
+       * scripttempl/i386go32.sc: Likewise.
+       * scripttempl/m68kaux.sc: Likewise.
+       * scripttempl/m68klynx.sc: Likewise.
+       * scripttempl/m88kbcs.sc: Likewise.
+       * scripttempl/maxqcoff.sc: Likewise.
+       * scripttempl/mcorepe.sc: Likewise.
+       * scripttempl/mips.sc: Likewise.
+       * scripttempl/ppcpe.sc: Likewise.
+       * scripttempl/sa29200.sc: Likewise.
+       * scripttempl/sparccoff.sc: Likewise.
+       * scripttempl/sparclynx.sc: Likewise.
+       * scripttempl/tic4xcoff.sc: Likewise.
+       * scripttempl/tic54xcoff.sc: Likewise.
+       * scripttempl/tic80coff.sc: Likewise.
+       * scripttempl/z8000.sc: Likewise.
+
 2009-09-07  Tristan Gingold  <gingold@adacore.com>
 
        * po/ld.pot: Regenerate.
index cdd3eac..d592dbe 100644 (file)
@@ -6,7 +6,7 @@
 cat <<EOF
 OUTPUT_ARCH(${ARCH})
 ${RELOCATING+${LIB_SEARCH_DIRS}}
-ENTRY(__start)
+${RELOCATING+ENTRY (__start)}
 SECTIONS
 {
   .pad 0 : { *(.pad) }
index 44a10c4..99565b4 100644 (file)
@@ -13,7 +13,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 781301c..ebc019a 100644 (file)
@@ -22,7 +22,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 186fac7..c58f56d 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("a.out-cris")
 OUTPUT_ARCH(cris)
-ENTRY(__start)
+${RELOCATING+ENTRY (__start)}
 SECTIONS
 {
   .text ${RELOCATING+ ${TEXT_START_ADDR}}:
index d996305..fb196f3 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY(_start)
+${RELOCATING+ENTRY (_start)}
 ${RELOCATING+${LIB_SEARCH_DIRS}}
 
 SECTIONS
index 62050ee..5079488 100644 (file)
@@ -1,6 +1,6 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-ENTRY(start)
+${RELOCATING+ENTRY (start)}
 
 SECTIONS {
   .text ${RELOCATING+${TEXT_START_ADDR}} : 
index 7ffdc38..cb72508 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 MEMORY
 {
        
index 215b50a..3565ece 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 MEMORY
 {
        vectarea : o =0xc00000, l = 0x0300 
index 7677261..a54b891 100644 (file)
@@ -47,7 +47,7 @@ OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
 /*${LIB_SEARCH_DIRS}*/
 ${RELOCATING+${LIB_SEARCH_DIRS}}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 _TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;                
 _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
index 34aebf6..0651c01 100644 (file)
@@ -41,7 +41,7 @@ ${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
 
 ${LIB_SEARCH_DIRS}
 
-ENTRY(_mainCRTStartup)
+${RELOCATING+ENTRY (_mainCRTStartup)}
 
 SECTIONS
 {
index 1fdf30c..f142f4b 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index c2bc2e1..9a41537 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300h)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 /* The memory size is 256KB to coincide with the simulator.
    Don't change either without considering the other.  */
index e2c2954..5cdfc5a 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300hn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index 53c9dec..e07253d 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300s)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 /* The memory size is 256KB to coincide with the simulator.
    Don't change either without considering the other.  */
index b2647ca..27ba4a1 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300sn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index d3807c0..247e977 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300sx)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 /* The memory size is 256KB to coincide with the simulator.
    Don't change either without considering the other.  */
index 0b1bcf1..90bd789 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300sxn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index 941ce08..a96ad54 100644 (file)
@@ -3,7 +3,7 @@ test "$LD_FLAG" = "N" && DATA_ADDR=.
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("\$START\$")
+${RELOCATING+ENTRY("\$START\$")}
 ${RELOCATING+${LIB_SEARCH_DIRS}}
 SECTIONS
 {
index 21a01e5..f507acc 100644 (file)
@@ -38,7 +38,7 @@ ${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
 
 ${LIB_SEARCH_DIRS}
 
-ENTRY(__start)
+${RELOCATING+ENTRY (__start)}
 ${RELOCATING+header = .;}
 ${RELOCATING+__fltused = .; /* set up floating pt for MS .obj\'s */}
 ${RELOCATING+__ldused = .;}
index fbb1b79..da14632 100644 (file)
@@ -9,7 +9,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 54908fe..e5bcf2a 100644 (file)
@@ -17,7 +17,7 @@ DTOR='.dtor : {
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 404280e..09032be 100644 (file)
@@ -9,7 +9,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 81d2245..c624aad 100644 (file)
@@ -3,7 +3,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index f52b14d..0cd6ab9 100644 (file)
@@ -5,7 +5,7 @@ FINI='.fini : { *(.fini) }'
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY(__start)
+${RELOCATING+ENTRY (__start)}
 ${RELOCATING+${LIB_SEARCH_DIRS}}
 
 SECTIONS                               
index 2e09304..d35107d 100644 (file)
@@ -2,7 +2,7 @@ test -z "$ENTRY" && ENTRY=_main
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 MEMORY 
   {
   rom (rx)  : ORIGIN = 0, LENGTH = 0x7FFE
index 5b10881..511fdb1 100644 (file)
@@ -47,7 +47,7 @@ fi
 cat <<EOF
 ${LIB_SEARCH_DIRS}
 
-ENTRY(_mainCRTStartup)
+${RELOCATING+ENTRY (_mainCRTStartup)}
 
 SECTIONS
 {
index 972351f..f53558a 100644 (file)
@@ -19,7 +19,7 @@ OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
              "${LITTLE_OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 83e2609..182fbe5 100644 (file)
@@ -22,7 +22,7 @@ ${LIB_SEARCH_DIRS}
    "-u mainCRTStartup" to make sure it gets included in the link.
 */
 
-ENTRY(mainCRTStartup)
+${RELOCATING+ENTRY (mainCRTStartup)}
 
 SECTIONS
 {
index a2f267e..96851d7 100644 (file)
@@ -1,6 +1,6 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-ENTRY(start)
+${RELOCATING+ENTRY (start)}
 
 SECTIONS {
   .text ${RELOCATING+${TEXT_START_ADDR}} : 
index 6bbb7ad..309aa83 100644 (file)
@@ -5,7 +5,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index c2b1e1d..d6ea110 100644 (file)
@@ -4,7 +4,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 121f3ed..83245ca 100644 (file)
@@ -73,7 +73,7 @@ ${RELOCATING-/* Linker script for $OUTPUT_ARCHNAME object file (ld -r).  */}
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH("${OUTPUT_ARCH}")
 ${LIB_SEARCH_DIRS}
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 ${RELOCATING+ __HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : ${HEAP_SIZE_DEFAULT};}
 ${RELOCATING+ __STACK_SIZE  = DEFINED(__STACK_SIZE)  ? __STACK_SIZE  : ${STACK_SIZE_DEFAULT};}
index 8d8a811..f17b480 100644 (file)
@@ -12,7 +12,7 @@ MEMORY
        /*PAGE 1 : */ data (W) : ORIGIN = 0x01000080, LENGTH = 0xFF80
 }
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS                               
 {                                      
index 2b6f653..f28e904 100644 (file)
@@ -23,7 +23,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 646c880..b03f5d8 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH("${OUTPUT_ARCH}")
-ENTRY(_start)
+${RELOCATING+ENTRY (_start)}
 
 SECTIONS                               
 {