From 85308672d396111a07c70e0704c5c4191826d4ac Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 18 Jul 2018 09:30:14 +0200 Subject: [PATCH] software/bios/linker: revert data section since required by RISC-V compiler --- litex/soc/software/bios/linker.ld | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/litex/soc/software/bios/linker.ld b/litex/soc/software/bios/linker.ld index 13b4bcaec..4cbe0bec2 100644 --- a/litex/soc/software/bios/linker.ld +++ b/litex/soc/software/bios/linker.ld @@ -26,6 +26,21 @@ SECTIONS _erodata = .; } > rom + .data : + { + . = ALIGN(4); + _fdata = .; + *(.data .data.* .gnu.linkonce.d.*) + *(.data1) + *(.sdata .sdata.* .gnu.linkonce.s.*) + + /* Make sure the file is aligned on disk as well + as in memory; CRC calculation requires that. */ + FILL(0); + . = ALIGN(4); + _edata = .; + } > rom + .bss : { . = ALIGN(4); @@ -45,9 +60,6 @@ SECTIONS { *(.eh_frame) *(.comment) - *(.data .data.* .gnu.linkonce.d.*) - *(.data1) - *(.sdata .sdata.* .gnu.linkonce.s.*) } }