keep new files; get rid of trailing spaces after sh-support file names
[deliverable/binutils-gdb.git] / ld / mips.sc-sh
index 3e3ba75d90da4841c50c71187e9104670dd1e263..3ce7bd2ab05619612f04def3b977b7cb13452daa 100644 (file)
@@ -1,28 +1,34 @@
-# Linker script for MIPS.  This works on a DECstation running Ultrix,
-# and may work on other platforms as well.
+# Linker script for MIPS systems.
 # Ian Lance Taylor <ian@cygnus.com>.
+# These variables may be overridden by the emulation file.  The
+# defaults are appropriate for a DECstation running Ultrix.
+test -z "$ENTRY" && ENTRY=__start
+test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
+test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
+test -z "$BSS_VAR" && BSS_VAR=
 cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 ${LIB_SEARCH_DIRS}
 
-ENTRY(__start)
+ENTRY(${ENTRY})
 
 SECTIONS
 {
-  .text ${RELOCATING+ 0x400000 + SIZEOF_HEADERS} : {
+  .text ${RELOCATING+ ${TEXT_START_ADDR}} : {
     *(.init)
     ${RELOCATING+ eprol  =  .};
     *(.text)
     *(.fini)
     ${RELOCATING+ etext  =  .};
   }
-  .rdata ${RELOCATING+ 0x10000000} : {
+  .rdata ${RELOCATING+ ${DATA_ADDR}} : {
     *(.rdata)
   }
   .data ${RELOCATING+ .} : {
     *(.data)
+    ${CONSTRUCTING+CONSTRUCTORS}
   }
-  ${RELOCATING+ _gp = . + 0x8000};
+  ${RELOCATING+ _gp = . + 0x8000;}
   .lit8 ${RELOCATING+ .} : {
     *(.lit8)
   }
@@ -32,14 +38,16 @@ SECTIONS
   .sdata ${RELOCATING+ .} : {
     *(.sdata)
   }
-  ${RELOCATING+ edata  =  .};
+  ${RELOCATING+ edata  =  .;}
+  ${BSS_VAR}
   .sbss ${RELOCATING+ .} : {
     *(.sbss)
+    *(.scommon)
   }
   .bss ${RELOCATING+ .} : {
     *(.bss)
     *(COMMON)
   }
-  ${RELOCATING+ end = .};
+  ${RELOCATING+ end = .;}
 }
 EOF
This page took 0.02429 seconds and 4 git commands to generate.