[U-Boot] Linker script u-boot.lds makes u-boot ELF not load with debugger

Palacios, Hector Hector.Palacios at digi.com
Wed May 18 13:28:54 CEST 2016


Hi,

I'm loading U-Boot to an i.MX6Q platform using ARM DSTREAM debugger and after running the DDR initialization script it fails to load the u-boot ELF binary complaining with:

loadfile "/home/hpalacio/git/u-boot-denx/u-boot"
ERROR(CMD16-TAD11-NAL18): 
! Failed to load "u-boot"
! Failed to write 160 bytes to address S:0x00010034
! Bus error on memory operation.
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00001808, DFAR = 0x00010034


If I revert the changes introduced to arch/arm/cpu/u-boot.lds in commit 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7, then the u-boot ELF loads fine:

diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 7336162d804f..cf5cc327a42b 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -127,14 +127,12 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _image_binary_end : { *(.dynsym) }
-       .dynbss : { *(.dynbss) }
-       .dynstr : { *(.dynstr*) }
-       .dynamic : { *(.dynamic*) }
-       .plt : { *(.plt*) }
-       .interp : { *(.interp*) }
-       .gnu.hash : { *(.gnu.hash) }
-       .gnu : { *(.gnu*) }
-       .ARM.exidx : { *(.ARM.exidx*) }
-       .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }
+       /DISCARD/ : { *(.dynsym) }
+       /DISCARD/ : { *(.dynstr*) }
+       /DISCARD/ : { *(.dynamic*) }
+       /DISCARD/ : { *(.plt*) }
+       /DISCARD/ : { *(.interp*) }
+       /DISCARD/ : { *(.gnu*) }
+       /DISCARD/ : { *(.ARM.exidx*) }
+       /DISCARD/ : { *(.gnu.linkonce.armexidx.*) }
 }


Does anybody know if I should do anything special in my debugger initialization script after commit 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7 to have it load U-Boot normally?

Thank you.
--
Héctor Palacios




More information about the U-Boot mailing list