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 cfde96c6087b10dba78c1e43de23f5b7095c4abc..721ba253d206df04b5b094be6a83baca1dc03d9b 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 cdd3eac8139f77b907d398f5cd24d749caf306e8..d592dbe59f1b787df93b06b41cdb8cfb6af79f18 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 44a10c469cd2836a9751042e98523a5b05b56569..99565b413186bdbb5aefe38543ad92611d96e1cd 100644 (file)
@@ -13,7 +13,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 781301c807da34cf3a4d5b13569c47ccb1677e85..ebc019a89f06ae5603e44bc5d2a42eb347ff5b5d 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 186fac765da8ca58609f7a641a0cf61a6d0f2b10..c58f56d80200200da7c66e0f48dc01561f9a516c 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 d9963054e76db3ae7ec0c4a452ed62064614010b..fb196f3b3d77122ed9d2409dc759858c6aa81804 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 62050ee2170154386c4251b9dd377a1292d6c658..507948850221910925ebccb577540e07fb08bce1 100644 (file)
@@ -1,6 +1,6 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-ENTRY(start)
+${RELOCATING+ENTRY (start)}
 
 SECTIONS {
   .text ${RELOCATING+${TEXT_START_ADDR}} : 
index 7ffdc38799b82fc241faa04107498d685af04a56..cb72508c9990aba818a5170ae0fce2faa74a0237 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 MEMORY
 {
        
index 215b50ae9c73902d28d145dce330afda8f997692..3565ecec36746b889bee6c7c55e2b0df4e8ec4bb 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 7677261ed58aa06d151d2a1bfb4ab19b2d85bb22..a54b89193c212a028330fa22b2406ea9297cfe84 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 34aebf6f94dc6e71837ca94e41c56ea8b64190b7..0651c017008b18fe20efad8405e5ffb53b5f09c6 100644 (file)
@@ -41,7 +41,7 @@ ${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
 
 ${LIB_SEARCH_DIRS}
 
-ENTRY(_mainCRTStartup)
+${RELOCATING+ENTRY (_mainCRTStartup)}
 
 SECTIONS
 {
index 1fdf30c8fd559063fd8b7d540f008b0d27bafcd9..f142f4bcc0d55d09f04af70f50eb119166abfdef 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index c2bc2e14baa2edfdaec0c6ea0223bce10db3d78a..9a415373ff0f13e6051ffe7def4d51e7d62c6186 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 e2c2954478582b2d8fb2b8a4574ab809e3d83c8e..5cdfc5a6c9399b0913acc14aeecdd07a72cadc14 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300hn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index 53c9dec11c2c133dc51864b825aa90fbe85a0ced..e07253d9bf9c6cc245ec53c9e71461f41a0065ab 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 b2647ca4058c9280b16ecce045b857c77cc07129..27ba4a13738e52e9317f6ef9559f3cb1a82d9e11 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300sn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index d3807c0d0cd101d1752ff70f6d4f834dee9f8458..247e9777e5e22175c11671037ec4c1f5e4e2b303 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 0b1bcf1196f84261d71383d4563c3d7ca8c47900..90bd7891b83a3523ec6722446c9d80a35c59cd3a 100644 (file)
@@ -11,7 +11,7 @@ TORS=".tors :
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(h8300sxn)
-ENTRY("_start")
+${RELOCATING+ENTRY ("_start")}
 
 MEMORY
 {
index 941ce08998c64c5fb2a828c9077ff550f4f4731d..a96ad54a21e71a85b14405296c491c346af109cb 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 21a01e56cdc1a9fe05de6fd0b1aebc282d1d8608..f507accffa603cafa66d6d40f527a6a29800230e 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 fbb1b7918c76511756cedeacf0bc748fc2cbb399..da14632024a6ed5eb16a519717c4fba2e2ba0813 100644 (file)
@@ -9,7 +9,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 54908fe110dfa18d2dc0a9c2b983add9a4b4d17e..e5bcf2ac5705607f94332cf63e901ed88ac0d005 100644 (file)
@@ -17,7 +17,7 @@ DTOR='.dtor : {
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 404280e1272c7a1aa6a2aaa11af10001244db76f..09032be8d69bb31d302f0ae0ab69068612e543a5 100644 (file)
@@ -9,7 +9,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 81d2245885ac0d2282d582b54846bf1c64b594bd..c624aadd2049ec5c89173956cd401e40b7f454e0 100644 (file)
@@ -3,7 +3,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index f52b14dc0ce32773e1f1bb4e35beb50f6d951a65..0cd6ab92589fc79c6bdab9f519d8c1fcc867ef7b 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 2e093048c05c06545c3b7f008b653afb341dffd8..d35107d778fa60321fca9a985a8e051187e7d05f 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 5b10881cd82bcd893ca58c4ebb344e09897bb150..511fdb1f898ecd0485fde5f7753ad5d8471fa6a7 100644 (file)
@@ -47,7 +47,7 @@ fi
 cat <<EOF
 ${LIB_SEARCH_DIRS}
 
-ENTRY(_mainCRTStartup)
+${RELOCATING+ENTRY (_mainCRTStartup)}
 
 SECTIONS
 {
index 972351f754b3968e65bad849cc906a7e7ac384a5..f53558aba4b81edf319ea5bd1844e712c761375c 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 83e260930c709bd3a65b30923b17f7769a4f1a50..182fbe5544ec5467fc4561731afaccdca2432a51 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 a2f267e649d583c54d3e539efaa2daef7803c34d..96851d7fec45a209f58159a6e7e5be1ef18d1c53 100644 (file)
@@ -1,6 +1,6 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-ENTRY(start)
+${RELOCATING+ENTRY (start)}
 
 SECTIONS {
   .text ${RELOCATING+${TEXT_START_ADDR}} : 
index 6bbb7ad6e903998d599752f1315227c2d15e7755..309aa836a5f0f36b3697107249fc0df8afcf79aa 100644 (file)
@@ -5,7 +5,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index c2b1e1d327de26b88622b187302758b521f90f85..d6ea11015a7dbeb486ec7bbf752ce448dd124953 100644 (file)
@@ -4,7 +4,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 121f3ed4c1f62c8d77f3b9b31ff3a67e5c279a96..83245caa10fb6b68449ab939e3b5499f36a7cbd7 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 8d8a81166b56da69c0d759db2e464f1c57fa4881..f17b480d1fdac982ede23dde6bc8303b80a7fb80 100644 (file)
@@ -12,7 +12,7 @@ MEMORY
        /*PAGE 1 : */ data (W) : ORIGIN = 0x01000080, LENGTH = 0xFF80
 }
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS                               
 {                                      
index 2b6f6534aaba3d0411f27891e54284ee0c501d21..f28e90490969e51c79cb9f3ab8e59993f30b9971 100644 (file)
@@ -23,7 +23,7 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(${ENTRY})
+${RELOCATING+ENTRY (${ENTRY})}
 
 SECTIONS
 {
index 646c88080a9af035326a8d4d26b8783753c5af6d..b03f5d85eef5789fe495807d762e1bb336eb1ef2 100644 (file)
@@ -1,7 +1,7 @@
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH("${OUTPUT_ARCH}")
-ENTRY(_start)
+${RELOCATING+ENTRY (_start)}
 
 SECTIONS                               
 {