Support arch-dependent fill
[deliverable/binutils-gdb.git] / ld / scripttempl / elf.sc
index 149eec7ab3e650ddb2c9efd15467c8044a69d85c..7994b5f11e8ded26491fe1f699f0406d3245bb5a 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Unusual variables checked by this code:
-#      NOP - four byte opcode for no-op (defaults to 0)
+#      NOP - four byte opcode for no-op (defaults to none)
 #      NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
 #              empty.
 #      SMALL_DATA_CTOR - .ctors contains small data.
 #
 #  Each of these can also have corresponding .rel.* and .rela.* sections.
 
+if test -n "$NOP"; then
+  FILL="=$NOP"
+else
+  FILL=
+fi
+
 test -z "$RODATA_NAME" && RODATA_NAME=rodata
 test -z "$SDATA_NAME" && SDATA_NAME=sdata
 test -z "$SBSS_NAME" && SBSS_NAME=sbss
@@ -438,7 +444,7 @@ cat <<EOF
     ${RELOCATING+${INIT_START}}
     KEEP (*(.init))
     ${RELOCATING+${INIT_END}}
-  } =${NOP-0}
+  } ${FILL}
 
   ${TEXT_PLT+${PLT}}
   ${TINY_READONLY_SECTION}
@@ -453,13 +459,13 @@ cat <<EOF
     /* .gnu.warning sections are handled specially by elf32.em.  */
     *(.gnu.warning)
     ${RELOCATING+${OTHER_TEXT_SECTIONS}}
-  } =${NOP-0}
+  } ${FILL}
   .fini         ${RELOCATING-0} :
   {
     ${RELOCATING+${FINI_START}}
     KEEP (*(.fini))
     ${RELOCATING+${FINI_END}}
-  } =${NOP-0}
+  } ${FILL}
   ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
   ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
   ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
This page took 0.02387 seconds and 4 git commands to generate.