diff options
Diffstat (limited to 'ld/emulparams')
-rw-r--r-- | ld/emulparams/elf64mmix.sh | 7 | ||||
-rw-r--r-- | ld/emulparams/mmo.sh | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ld/emulparams/elf64mmix.sh b/ld/emulparams/elf64mmix.sh index 787b50d..bdb5d0a 100644 --- a/ld/emulparams/elf64mmix.sh +++ b/ld/emulparams/elf64mmix.sh @@ -35,11 +35,14 @@ EXTRA_EM_FILE=mmixelf # DEFINED wouldn't find the symbol if it was at the top; presumably # before the definition, if the definition is not in the first file. # FIXME: Arguably a linker bug. -OTHER_TEXT_SECTIONS=' +# Only do this for a final link, or else we'll mess up e.g. error +# messages. +OTHER_TEXT_SECTIONS=" +${RELOCATING+ _start. = (DEFINED (_start) ? _start : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0))); PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.)); -' +}" OTHER_SECTIONS=' .MMIX.reg_contents : diff --git a/ld/emulparams/mmo.sh b/ld/emulparams/mmo.sh index e0a8798..ca98013 100644 --- a/ld/emulparams/mmo.sh +++ b/ld/emulparams/mmo.sh @@ -5,6 +5,7 @@ TARGET_PAGE_SIZE=256 TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0' DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000' OUTPUT_FORMAT=mmo +RELOCATEABLE_OUTPUT_FORMAT=elf64-mmix ARCH=mmix COMPILE_IN=yes EXTRA_EM_FILE=mmo |