ld: pru: Fix resource_table output section alignment
[binutils-gdb.git] / ld / scripttempl / sh.sc
index 15d77b9d812a53af699fdc730551094e0b017489..47385af7c73428c92e2f5983605052eb5df17a99 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2017 Free Software Foundation, Inc.
+# Copyright (C) 2014-2021 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -12,10 +12,10 @@ TORS=".tors :
     ___dtors = . ;
     *(.dtors)
     ___dtors_end = . ;
-  } > ram"
+  }${RELOCATING+ > ram}"
 
 cat <<EOF
-/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
    Copying and distribution of this script, with or without modification,
    are permitted in any medium without royalty provided the copyright
@@ -24,11 +24,17 @@ cat <<EOF
 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
 OUTPUT_ARCH(${ARCH})
 
+EOF
+
+test -n "${RELOCATING}" && cat <<EOF
 MEMORY
 {
   ram : o = 0x1000, l = 512k
 }
 
+EOF
+
+cat <<EOF
 SECTIONS
 {
   .text :