]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/scripttempl/elf32crx.sc
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / scripttempl / elf32crx.sc
index 89aafa64fd62d8273fa3836e9a9a90b03445c8c3..26cc554ba5812cf9488261d1828a5914dbcce235 100644 (file)
@@ -1,11 +1,15 @@
 # Linker Script for National Semiconductor's CRX-ELF32.
 #
-# Copyright (C) 2014-2018 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
 # notice and this notice are preserved.
 
+# Using an empty script for ld -r is better than mashing together
+# sections.  This hack likely leaves ld -Ur broken.
+test -n "${RELOCATING}" || exit 0
+
 # The next line should be uncommented if it is desired to link
 # without libstart.o and directly enter main.
 
@@ -16,7 +20,7 @@ cat <<EOF
 
 /* Example Linker Script for linking NS CRX elf32 files.
 
-   Copyright (C) 2014-2018 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
@@ -54,14 +58,14 @@ SECTIONS
   .init :
   {
     __INIT_START = .;
-    KEEP (*(.init))
+    KEEP (*(SORT_NONE(.init)))
     __INIT_END = .;
   } > rom
 
   .fini :
   {
     __FINI_START = .;
-    KEEP (*(.fini))
+    KEEP (*(SORT_NONE(.fini)))
     __FINI_END = .;
   } > rom