gas: sparc: fix collision of registers and pseudo-ops.
[deliverable/binutils-gdb.git] / ld / scripttempl / elfmicroblaze.sc
index 62de661499a22b104cb90bd2d9380866083496a5..a9484bf0f39bcd68e52062e0db8e3802070c188e 100644 (file)
@@ -1,11 +1,19 @@
 # Adapted from mips.sc
+#
+# Copyright (C) 2014-2016 Free Software Foundation, Inc.
+# 
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
 # 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="0x0"
 
-CTOR=".ctors  : 
+CTOR=".ctors ${CONSTRUCTING-0} : 
   {
     ${CONSTRUCTING+${CTOR_START}}
     /* gcc uses crtbegin.o to find the start of
@@ -31,7 +39,7 @@ CTOR=".ctors  :
     ${CONSTRUCTING+${CTOR_END}}
   }"
 
-DTOR=" .dtors        :
+DTOR=" .dtors       ${CONSTRUCTING-0} :
   {
     ${CONSTRUCTING+${DTOR_START}}
     KEEP (*crtbegin.o(.dtors))
@@ -42,6 +50,12 @@ DTOR=" .dtors        :
   }"
 
 cat <<EOF
+/* Copyright (C) 2014-2016 Free Software Foundation, Inc.
+
+   Copying and distribution of this script, with or without modification,
+   are permitted in any medium without royalty provided the copyright
+   notice and this notice are preserved.  */
+
 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
              "${LITTLE_OUTPUT_FORMAT}")
 /*${LIB_SEARCH_DIRS}*/
@@ -183,7 +197,7 @@ SECTIONS
     ${RELOCATING+*(.bss.*)}
     ${RELOCATING+*(.gnu.linkonce.b.*)}
     ${RELOCATING+*(COMMON)}
-    ${RELOCATING+. = ALIGN(4);}  
+    ${RELOCATING+. = ALIGN(. != 0 ? 4 : 1);}
     
     ${RELOCATING+PROVIDE (__bss_end = .);}
 
@@ -203,7 +217,7 @@ SECTIONS
   .stack : {
     ${RELOCATING+ _stack_end = .;}
     ${RELOCATING+ . += _STACK_SIZE;}
-    ${RELOCATING+ . = ALIGN(8);}
+    ${RELOCATING+ . = ALIGN(. != 0 ? 8 : 1);}
     ${RELOCATING+ _stack = .;}
     ${RELOCATING+ _end = .;}
   }
This page took 0.025903 seconds and 4 git commands to generate.