aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-07-29 00:25:22 +0000
committerHans-Peter Nilsson <hp@axis.com>2009-07-29 00:25:22 +0000
commit18c32df5b44a1b3e6a5e9600c9a4c4bd731d24f2 (patch)
treeb5e0b344047f0182d994a4f5de38d0af3cc26a39 /ld/scripttempl
parent45de461e3b099c6d9df280103e338c0eb027831c (diff)
downloadfsf-binutils-gdb-18c32df5b44a1b3e6a5e9600c9a4c4bd731d24f2.zip
fsf-binutils-gdb-18c32df5b44a1b3e6a5e9600c9a4c4bd731d24f2.tar.gz
fsf-binutils-gdb-18c32df5b44a1b3e6a5e9600c9a4c4bd731d24f2.tar.bz2
* scripttempl/mmo.sc: For relocateable links, set $OUTPUT_FORMAT to
the new $RELOCATEABLE_OUTPUT_FORMAT, if set. (OUTPUT_FORMAT): Use the variable $OUTPUT_FORMAT. (ENTRY): Don't emit for relocateable links. (/DISCARD/): Don't discard .gnu.warning.* for relocateable links. * emulparams/mmo.sh (RELOCATEABLE_OUTPUT_FORMAT): Set, to elf64-mmix. * emulparams/elf64mmix.sh (OTHER_TEXT_SECTIONS): Empty, don't provide "Main" or set "_start.", for relocateable links.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/mmo.sc10
1 files changed, 7 insertions, 3 deletions
diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc
index 599db83..3380884 100644
--- a/ld/scripttempl/mmo.sc
+++ b/ld/scripttempl/mmo.sc
@@ -1,7 +1,11 @@
+# MMO is not a relocateable format, and we don't want to require an
+# explicit (e.g.) "-m elf64mmix" when -r is used.
+test -z $RELOCATEABLE_OUTPUT_FORMAT && RELOCATEABLE_OUTPUT_FORMAT=$OUTPUT_FORMAT
+test -z ${RELOCATING+0} && OUTPUT_FORMAT=$RELOCATEABLE_OUTPUT_FORMAT
cat <<EOF
-OUTPUT_FORMAT("mmo")
+OUTPUT_FORMAT("$OUTPUT_FORMAT")
OUTPUT_ARCH(mmix)
-ENTRY(Main)
+${RELOCATING+ENTRY(Main)}
SECTIONS
{
.text ${RELOCATING+ ${TEXT_START_ADDR}}:
@@ -128,6 +132,6 @@ SECTIONS
/* Unfortunately, stabs are not mappable from ELF to MMO.
It can probably be fixed with some amount of work. */
/DISCARD/ :
- { *(.gnu.warning.*); }
+ { ${RELOCATING+ *(.gnu.warning.*);} }
}
EOF