]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/scripttempl/iq2000.sc
Revert "2.41 Release sources"
[thirdparty/binutils-gdb.git] / ld / scripttempl / iq2000.sc
index c5ac951396b20182ab0e03a0077723e6bbed1796..c3d3620bc78156a32a94d69c7d04d15fe7786619 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2017 Free Software Foundation, Inc.
+# Copyright (C) 2014-2023 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -121,7 +121,7 @@ else
 fi
 
 cat <<EOF
-/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
+/* Copyright (C) 2014-2023 Free Software Foundation, Inc.
 
    Copying and distribution of this script, with or without modification,
    are permitted in any medium without royalty provided the copyright
@@ -289,7 +289,7 @@ cat <<EOF
   .init        ${RELOCATING-0} :
   {
     ${RELOCATING+${INIT_START}}
-    KEEP (*(.init))
+    KEEP (*(SORT_NONE(.init)))
     ${RELOCATING+${INIT_END}}
   } =${NOP-0}
 
@@ -300,7 +300,7 @@ cat <<EOF
     *(.text)
     ${RELOCATING+*(.text.*)}
     *(.stub)
-    /* .gnu.warning sections are handled specially by elf32.em.  */
+    /* .gnu.warning sections are handled specially by elf.em.  */
     *(.gnu.warning)
     ${RELOCATING+*(.gnu.linkonce.t.*)}
     ${RELOCATING+${OTHER_TEXT_SECTIONS}}
@@ -308,7 +308,7 @@ cat <<EOF
   .fini    ${RELOCATING-0} :
   {
     ${RELOCATING+${FINI_START}}
-    KEEP (*(.fini))
+    KEEP (*(SORT_NONE(.fini)))
     ${RELOCATING+${FINI_END}}
   } =${NOP-0}
   ${RELOCATING+PROVIDE (__etext = .);}
@@ -333,9 +333,9 @@ cat <<EOF
   {
     ${RELOCATING+PROVIDE (__eh_frame_begin = .);}
     *(.eh_frame)
-    LONG (0);
+    ${RELOCATING+LONG (0);}
     ${RELOCATING+PROVIDE (__eh_frame_end = .);}
-  } ${RELOCATING+}
+  }
   .gcc_except_table : { *(.gcc_except_table) }
   ${INITIAL_READONLY_SECTIONS}
   .hash        ${RELOCATING-0} : { *(.hash)            }
@@ -356,7 +356,7 @@ cat <<EOF
   .jcr : { KEEP (*(.jcr)) }
   ${DATA_PLT+${PLT}}
   ${RELOCATING+${OTHER_GOT_SYMBOLS}}
-  .got         ${RELOCATING-0} : { *(.got.plt) *(.got) }
+  .got         ${RELOCATING-0} : {${RELOCATING+ *(.got.plt)} *(.got) }
   ${RELOCATING+${OTHER_GOT_SECTIONS}}
   ${CREATE_SHLIB+${SDATA2}}
   ${CREATE_SHLIB+${SBSS2}}
@@ -373,32 +373,33 @@ cat <<EOF
   ${RELOCATING+${OTHER_SDATA_SECTIONS}}
   ${RELOCATING+_edata = .;}
   ${RELOCATING+PROVIDE (edata = .);}
+  ${RELOCATING+. = ALIGN(ALIGNOF(NEXT_SECTION));}
   ${RELOCATING+__bss_start = .;}
   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
   .sbss    ${RELOCATING-0} :
   {
     ${RELOCATING+PROVIDE (__sbss_start = .);}
     ${RELOCATING+PROVIDE (___sbss_start = .);}
-    *(.dynsbss)
+    ${RELOCATING+*(.dynsbss)}
     *(.sbss)
     ${RELOCATING+*(.sbss.*)}
     ${RELOCATING+*(.gnu.linkonce.sb.*)}
-    *(.scommon)
+    ${RELOCATING+*(.scommon)}
     ${RELOCATING+PROVIDE (__sbss_end = .);}
     ${RELOCATING+PROVIDE (___sbss_end = .);}
   }
   ${BSS_PLT+${PLT}}
   .bss     ${RELOCATING-0} :
   {
-   *(.dynbss)
+   ${RELOCATING+*(.dynbss)}
    *(.bss)
    ${RELOCATING+*(.bss.*)}
    ${RELOCATING+*(.gnu.linkonce.b.*)}
-   *(COMMON)
+   ${RELOCATING+*(COMMON)
    /* Align here to ensure that the .bss section occupies space up to
       _end.  Align after .bss to ensure correct alignment even if the
       .bss section disappears because there are no input sections.  */
-   ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+   . = ALIGN(${ALIGNMENT});}
   }
   ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
   ${RELOCATING+. = ALIGN(${ALIGNMENT});}
@@ -406,19 +407,10 @@ cat <<EOF
   ${RELOCATING+_end = .;}
   ${RELOCATING+PROVIDE (end = .);}
 
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-
-  .comment 0 : { *(.comment) }
-
 EOF
 
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
 
 cat <<EOF
   ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}