Implement proper "startup-with-shell" support on gdbserver
[deliverable/binutils-gdb.git] / ld / emulparams / elf64mmix.sh
index dc4b9e56c58d4442ab7944b99f8f7fe4b1703e11..bdb5d0abcd2367a347824c8f197a1b57ab9b891d 100644 (file)
@@ -3,6 +3,7 @@ GENERATE_SHLIB_SCRIPT=yes
 ELFSIZE=64
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf64-mmix"
+NO_REL_RELOCS=yes
 ENTRY=_start.
 
 # Default to 0 as mmixal does.
@@ -12,11 +13,7 @@ TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0'
 TEXT_BASE_ADDRESS=$TEXT_START_ADDR
 DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000'
 
-# Setting this anywhere near the quite reasonable value of 0x10000
-# causes the binary to bloat to reach page alignment between segments.
-# Let's just have a 256-byte default page alignment.  Having some
-# alignment at all gives a warm feeling but not much more.
-MAXPAGESIZE=256
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ARCH=mmix
 MACHINE=
 COMPILE_IN=yes
@@ -38,17 +35,21 @@ 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_RELOCATING_SECTIONS='
+OTHER_SECTIONS='
  .MMIX.reg_contents :
  {
    /* Note that this section always has a fixed VMA - that of its
       first register * 8.  */
+   *(.MMIX.reg_contents.linker_allocated);
    *(.MMIX.reg_contents);
  }
 '
@@ -57,4 +58,4 @@ OTHER_RELOCATING_SECTIONS='
 # EXECUTABLE_SYMBOLS.
 # By default, put the high end of the stack where the register stack
 # begins.  They grow in opposite directions.  */
-OTHER_SECTIONS='PROVIDE (__Stack_start = 0x6000000000000000);'
+OTHER_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);"
This page took 0.023836 seconds and 4 git commands to generate.