From: Dave Marples Date: Tue, 12 May 2020 22:32:49 +0000 (+0100) Subject: Bios linker edits to prevent inappropriate optimisation X-Git-Tag: 24jan2021_ls180~348^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2d82dacf22d6c197c9c33ed755a24547294beeb;p=litex.git Bios linker edits to prevent inappropriate optimisation --- diff --git a/litex/soc/software/bios/linker.ld b/litex/soc/software/bios/linker.ld index e0211a6b..ee88f2e6 100644 --- a/litex/soc/software/bios/linker.ld +++ b/litex/soc/software/bios/linker.ld @@ -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