Bios linker edits to prevent inappropriate optimisation
authorDave Marples <dave@marples.net>
Tue, 12 May 2020 22:32:49 +0000 (23:32 +0100)
committerDave Marples <dave@marples.net>
Tue, 12 May 2020 22:32:49 +0000 (23:32 +0100)
litex/soc/software/bios/linker.ld

index e0211a6b409810476e398491296dd83c4cc566e7..ee88f2e6dcf2d710c15ff097e20b77be1cfd8504 100644 (file)
@@ -8,6 +8,12 @@ SECTIONS
        .text :
        {
                _ftext = .;
+                /* Make sure crt0 files come first, and they, and the isr */
+                /* don't get disposed of by greedy optimisation */
+                *crt0*(.text)
+                KEEP(*crt0*(.text))
+                KEEP(*(.text.isr))
+
                *(.text .stub .text.* .gnu.linkonce.t.*)
                _etext = .;
        } > rom