
If CONFIG_DEBUG_RELOC_FIX_ADDR is defined, make u-boot_r. u-boot_r is ELF file which is linked for fixed relocation address specified by CONFIG_DEBUG_RELOC_FIX_ADDR. Feed this file to debugger to get relocated symbol addresses.
Signed-off-by: Tetsuyuki Kobayashi koba@kmckk.co.jp --- Makefile | 7 +++++-- config.mk | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile index bc15209..56d87cd 100644 --- a/Makefile +++ b/Makefile @@ -405,6 +405,9 @@ ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin +ifneq ($(CONFIG_DEBUG_RELOC_FIX_ADDR),) +ALL-y += $(obj)u-boot_r +endif
# enable combined SPL/u-boot/dtb rules for tegra ifeq ($(SOC),tegra20) @@ -540,10 +543,10 @@ GEN_UBOOT = \ cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ $$UNDEF_LST $(__OBJS) \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ - -Map u-boot.map -o u-boot + -Map u-boot.map -o $(notdir $@) endif
-$(obj)u-boot: depend \ +$(obj)u-boot $(obj)u-boot_r: depend \ $(SUBDIR_TOOLS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds $(GEN_UBOOT) ifeq ($(CONFIG_KALLSYMS),y) diff --git a/config.mk b/config.mk index b7cd481..99b3b11 100644 --- a/config.mk +++ b/config.mk @@ -269,9 +269,14 @@ LDFLAGS += $(PLATFORM_LDFLAGS) LDFLAGS_FINAL += -Bstatic
LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL) +LDFLAGS_u-boot_r := $(LDFLAGS_u-boot) + ifneq ($(CONFIG_SYS_TEXT_BASE),) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) endif +ifneq ($(CONFIG_DEBUG_RELOC_FIX_ADDR),) +LDFLAGS_u-boot_r += -Ttext $(CONFIG_DEBUG_RELOC_FIX_ADDR) +endif
LDFLAGS_u-boot-spl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) ifneq ($(CONFIG_SPL_TEXT_BASE),)