]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
uboot: Use "mdbtrick" target when building elf for ARC
authorZakharov Vlad <Vladislav.Zakharov@synopsys.com>
Fri, 27 May 2016 17:51:41 +0000 (20:51 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jun 2016 19:40:19 +0000 (21:40 +0200)
By default position independent executables (PIE) are generated
when building U-Boot elf target. MetaWare debugger doesn't support
PIE (position-independent executable).

In order to allow MDB load and run U-Boot elf, we need to do a
special trick, called "mdbtrick".

This special build target is used to fake generated U-Boot elf by:
    1. Reset PIE flag in ELF header
    2. Strip all debug information from elf

Signed-off-by: Zakharov Vlad <vzakhar@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
boot/uboot/uboot.mk

index bc5d952bbe9c5dd91d294b38cb5ca10aefbb24fa..a2274eea71756791a639dad5cd866c8616a31d38 100644 (file)
@@ -38,6 +38,10 @@ endif
 
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
 UBOOT_BIN = u-boot
+# To make elf usable for debuging on ARC use special target
+ifeq ($(BR2_arc),y)
+UBOOT_MAKE_TARGET = mdbtrick
+endif
 else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
 UBOOT_BIN = u-boot.kwb
 UBOOT_MAKE_TARGET = $(UBOOT_BIN)