diff options
36 files changed, 73 insertions, 35 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index cfde96c6087..721ba253d20 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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. diff --git a/ld/scripttempl/aix.sc b/ld/scripttempl/aix.sc index cdd3eac8139..d592dbe59f1 100644 --- a/ld/scripttempl/aix.sc +++ b/ld/scripttempl/aix.sc @@ -6,7 +6,7 @@ cat <<EOF OUTPUT_ARCH(${ARCH}) ${RELOCATING+${LIB_SEARCH_DIRS}} -ENTRY(__start) +${RELOCATING+ENTRY (__start)} SECTIONS { .pad 0 : { *(.pad) } diff --git a/ld/scripttempl/alpha.sc b/ld/scripttempl/alpha.sc index 44a10c469cd..99565b41318 100644 --- a/ld/scripttempl/alpha.sc +++ b/ld/scripttempl/alpha.sc @@ -13,7 +13,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/armcoff.sc b/ld/scripttempl/armcoff.sc index 781301c807d..ebc019a89f0 100644 --- a/ld/scripttempl/armcoff.sc +++ b/ld/scripttempl/armcoff.sc @@ -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 { diff --git a/ld/scripttempl/crisaout.sc b/ld/scripttempl/crisaout.sc index 186fac765da..c58f56d8020 100644 --- a/ld/scripttempl/crisaout.sc +++ b/ld/scripttempl/crisaout.sc @@ -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}}: diff --git a/ld/scripttempl/delta68.sc b/ld/scripttempl/delta68.sc index d9963054e76..fb196f3b3d7 100644 --- a/ld/scripttempl/delta68.sc +++ b/ld/scripttempl/delta68.sc @@ -1,7 +1,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) -ENTRY(_start) +${RELOCATING+ENTRY (_start)} ${RELOCATING+${LIB_SEARCH_DIRS}} SECTIONS diff --git a/ld/scripttempl/ebmon29k.sc b/ld/scripttempl/ebmon29k.sc index 62050ee2170..50794885022 100644 --- a/ld/scripttempl/ebmon29k.sc +++ b/ld/scripttempl/ebmon29k.sc @@ -1,6 +1,6 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") -ENTRY(start) +${RELOCATING+ENTRY (start)} SECTIONS { .text ${RELOCATING+${TEXT_START_ADDR}} : diff --git a/ld/scripttempl/elf32xc16x.sc b/ld/scripttempl/elf32xc16x.sc index 7ffdc38799b..cb72508c999 100644 --- a/ld/scripttempl/elf32xc16x.sc +++ b/ld/scripttempl/elf32xc16x.sc @@ -1,7 +1,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { diff --git a/ld/scripttempl/elf32xc16xl.sc b/ld/scripttempl/elf32xc16xl.sc index 215b50ae9c7..3565ecec367 100644 --- a/ld/scripttempl/elf32xc16xl.sc +++ b/ld/scripttempl/elf32xc16xl.sc @@ -1,7 +1,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { vectarea : o =0xc00000, l = 0x0300 diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elfmicroblaze.sc index 7677261ed58..a54b89193c2 100644 --- a/ld/scripttempl/elfmicroblaze.sc +++ b/ld/scripttempl/elfmicroblaze.sc @@ -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; diff --git a/ld/scripttempl/epocpe.sc b/ld/scripttempl/epocpe.sc index 34aebf6f94d..0651c017008 100644 --- a/ld/scripttempl/epocpe.sc +++ b/ld/scripttempl/epocpe.sc @@ -41,7 +41,7 @@ ${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})} ${LIB_SEARCH_DIRS} -ENTRY(_mainCRTStartup) +${RELOCATING+ENTRY (_mainCRTStartup)} SECTIONS { diff --git a/ld/scripttempl/h8300.sc b/ld/scripttempl/h8300.sc index 1fdf30c8fd5..f142f4bcc0d 100644 --- a/ld/scripttempl/h8300.sc +++ b/ld/scripttempl/h8300.sc @@ -11,7 +11,7 @@ TORS=".tors : cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(${ARCH}) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { diff --git a/ld/scripttempl/h8300h.sc b/ld/scripttempl/h8300h.sc index c2bc2e14baa..9a415373ff0 100644 --- a/ld/scripttempl/h8300h.sc +++ b/ld/scripttempl/h8300h.sc @@ -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. */ diff --git a/ld/scripttempl/h8300hn.sc b/ld/scripttempl/h8300hn.sc index e2c29544785..5cdfc5a6c93 100644 --- a/ld/scripttempl/h8300hn.sc +++ b/ld/scripttempl/h8300hn.sc @@ -11,7 +11,7 @@ TORS=".tors : cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(h8300hn) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { diff --git a/ld/scripttempl/h8300s.sc b/ld/scripttempl/h8300s.sc index 53c9dec11c2..e07253d9bf9 100644 --- a/ld/scripttempl/h8300s.sc +++ b/ld/scripttempl/h8300s.sc @@ -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. */ diff --git a/ld/scripttempl/h8300sn.sc b/ld/scripttempl/h8300sn.sc index b2647ca4058..27ba4a13738 100644 --- a/ld/scripttempl/h8300sn.sc +++ b/ld/scripttempl/h8300sn.sc @@ -11,7 +11,7 @@ TORS=".tors : cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(h8300sn) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { diff --git a/ld/scripttempl/h8300sx.sc b/ld/scripttempl/h8300sx.sc index d3807c0d0cd..247e9777e5e 100644 --- a/ld/scripttempl/h8300sx.sc +++ b/ld/scripttempl/h8300sx.sc @@ -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. */ diff --git a/ld/scripttempl/h8300sxn.sc b/ld/scripttempl/h8300sxn.sc index 0b1bcf1196f..90bd7891b83 100644 --- a/ld/scripttempl/h8300sxn.sc +++ b/ld/scripttempl/h8300sxn.sc @@ -11,7 +11,7 @@ TORS=".tors : cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH(h8300sxn) -ENTRY("_start") +${RELOCATING+ENTRY ("_start")} MEMORY { diff --git a/ld/scripttempl/hppaelf.sc b/ld/scripttempl/hppaelf.sc index 941ce08998c..a96ad54a21e 100644 --- a/ld/scripttempl/hppaelf.sc +++ b/ld/scripttempl/hppaelf.sc @@ -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 { diff --git a/ld/scripttempl/i386beos.sc b/ld/scripttempl/i386beos.sc index 21a01e56cdc..f507accffa6 100644 --- a/ld/scripttempl/i386beos.sc +++ b/ld/scripttempl/i386beos.sc @@ -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 = .;} diff --git a/ld/scripttempl/i386coff.sc b/ld/scripttempl/i386coff.sc index fbb1b7918c7..da14632024a 100644 --- a/ld/scripttempl/i386coff.sc +++ b/ld/scripttempl/i386coff.sc @@ -9,7 +9,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/i386go32.sc b/ld/scripttempl/i386go32.sc index 54908fe110d..e5bcf2ac570 100644 --- a/ld/scripttempl/i386go32.sc +++ b/ld/scripttempl/i386go32.sc @@ -17,7 +17,7 @@ DTOR='.dtor : { cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}") -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/m68kaux.sc b/ld/scripttempl/m68kaux.sc index 404280e1272..09032be8d69 100644 --- a/ld/scripttempl/m68kaux.sc +++ b/ld/scripttempl/m68kaux.sc @@ -9,7 +9,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/m68klynx.sc b/ld/scripttempl/m68klynx.sc index 81d2245885a..c624aadd204 100644 --- a/ld/scripttempl/m68klynx.sc +++ b/ld/scripttempl/m68klynx.sc @@ -3,7 +3,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/m88kbcs.sc b/ld/scripttempl/m88kbcs.sc index f52b14dc0ce..0cd6ab92589 100644 --- a/ld/scripttempl/m88kbcs.sc +++ b/ld/scripttempl/m88kbcs.sc @@ -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 diff --git a/ld/scripttempl/maxqcoff.sc b/ld/scripttempl/maxqcoff.sc index 2e093048c05..d35107d778f 100644 --- a/ld/scripttempl/maxqcoff.sc +++ b/ld/scripttempl/maxqcoff.sc @@ -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 diff --git a/ld/scripttempl/mcorepe.sc b/ld/scripttempl/mcorepe.sc index 5b10881cd82..511fdb1f898 100644 --- a/ld/scripttempl/mcorepe.sc +++ b/ld/scripttempl/mcorepe.sc @@ -47,7 +47,7 @@ fi cat <<EOF ${LIB_SEARCH_DIRS} -ENTRY(_mainCRTStartup) +${RELOCATING+ENTRY (_mainCRTStartup)} SECTIONS { diff --git a/ld/scripttempl/mips.sc b/ld/scripttempl/mips.sc index 972351f754b..f53558aba4b 100644 --- a/ld/scripttempl/mips.sc +++ b/ld/scripttempl/mips.sc @@ -19,7 +19,7 @@ OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/ppcpe.sc b/ld/scripttempl/ppcpe.sc index 83e260930c7..182fbe5544e 100644 --- a/ld/scripttempl/ppcpe.sc +++ b/ld/scripttempl/ppcpe.sc @@ -22,7 +22,7 @@ ${LIB_SEARCH_DIRS} "-u mainCRTStartup" to make sure it gets included in the link. */ -ENTRY(mainCRTStartup) +${RELOCATING+ENTRY (mainCRTStartup)} SECTIONS { diff --git a/ld/scripttempl/sa29200.sc b/ld/scripttempl/sa29200.sc index a2f267e649d..96851d7fec4 100644 --- a/ld/scripttempl/sa29200.sc +++ b/ld/scripttempl/sa29200.sc @@ -1,6 +1,6 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") -ENTRY(start) +${RELOCATING+ENTRY (start)} SECTIONS { .text ${RELOCATING+${TEXT_START_ADDR}} : diff --git a/ld/scripttempl/sparccoff.sc b/ld/scripttempl/sparccoff.sc index 6bbb7ad6e90..309aa836a5f 100644 --- a/ld/scripttempl/sparccoff.sc +++ b/ld/scripttempl/sparccoff.sc @@ -5,7 +5,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/sparclynx.sc b/ld/scripttempl/sparclynx.sc index c2b1e1d327d..d6ea11015a7 100644 --- a/ld/scripttempl/sparclynx.sc +++ b/ld/scripttempl/sparclynx.sc @@ -4,7 +4,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/tic4xcoff.sc b/ld/scripttempl/tic4xcoff.sc index 121f3ed4c1f..83245caa10f 100644 --- a/ld/scripttempl/tic4xcoff.sc +++ b/ld/scripttempl/tic4xcoff.sc @@ -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};} diff --git a/ld/scripttempl/tic54xcoff.sc b/ld/scripttempl/tic54xcoff.sc index 8d8a81166b5..f17b480d1fd 100644 --- a/ld/scripttempl/tic54xcoff.sc +++ b/ld/scripttempl/tic54xcoff.sc @@ -12,7 +12,7 @@ MEMORY /*PAGE 1 : */ data (W) : ORIGIN = 0x01000080, LENGTH = 0xFF80 } -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/tic80coff.sc b/ld/scripttempl/tic80coff.sc index 2b6f6534aab..f28e9049096 100644 --- a/ld/scripttempl/tic80coff.sc +++ b/ld/scripttempl/tic80coff.sc @@ -23,7 +23,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} -ENTRY(${ENTRY}) +${RELOCATING+ENTRY (${ENTRY})} SECTIONS { diff --git a/ld/scripttempl/z8000.sc b/ld/scripttempl/z8000.sc index 646c88080a9..b03f5d85eef 100644 --- a/ld/scripttempl/z8000.sc +++ b/ld/scripttempl/z8000.sc @@ -1,7 +1,7 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}") OUTPUT_ARCH("${OUTPUT_ARCH}") -ENTRY(_start) +${RELOCATING+ENTRY (_start)} SECTIONS { |