]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/scripttempl/elfd30v.sc
Add SORT_NONE to .init and .fini in scripts
[thirdparty/binutils-gdb.git] / ld / scripttempl / elfd30v.sc
index c2b3ebabdbf620724919f00e1bcf3612626473e1..e324c601095b87eda4c718141f8bab51dd138753 100644 (file)
@@ -116,7 +116,7 @@ SECTIONS
   .rel.plt             ${RELOCATING-0} : { *(.rel.plt) }
   .rela.plt            ${RELOCATING-0} : { *(.rela.plt) }
 
-  .init                        ${RELOCATING-0} : { *(.init) } =${NOP-0}
+  .init                        ${RELOCATING-0} : { KEEP (*(SORT_NONE(.init))) } =${NOP-0}
   ${DATA_PLT-${PLT}}
 
   /* Internal text space */
@@ -127,8 +127,7 @@ SECTIONS
   {
     *(.text)
     ${RELOCATING+*(.gnu.linkonce.t*)
-    *(SORT_NONE(.init))
-    *(SORT_NONE(.fini))
+    KEEP (*(SORT_NONE(.fini)))
     _etext = . ;}
   } ${RELOCATING+ > ${TEXT_MEMORY}}