summaryrefslogtreecommitdiff
path: root/arch/arc/lib
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2016-08-03 20:45:22 +0300
committerAlexey Brodkin <abrodkin@synopsys.com>2016-08-05 12:50:25 +0300
commitffffcd15948d9d1081afd6f1215a9850bd9f4bd5 (patch)
tree883c55e5eebdefd2d311922851b71e23474826ad /arch/arc/lib
parente1efe43c710bec8d951c25f163cc8b0c5eb92294 (diff)
downloadu-boot-imx-ffffcd15948d9d1081afd6f1215a9850bd9f4bd5.zip
u-boot-imx-ffffcd15948d9d1081afd6f1215a9850bd9f4bd5.tar.gz
u-boot-imx-ffffcd15948d9d1081afd6f1215a9850bd9f4bd5.tar.bz2
arc: Add debug messages during relocation fixups
This might be useful to make sure relocation fixups really happen. And since this info gets printed only in DEBUG build it doesn't really hurt normal execution. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'arch/arc/lib')
-rw-r--r--arch/arc/lib/relocate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 5c2c2d1..7709633 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -37,6 +37,9 @@ int do_elf_reloc_fixups(void)
Elf32_Rela *re_src = (Elf32_Rela *)(&__rel_dyn_start);
Elf32_Rela *re_end = (Elf32_Rela *)(&__rel_dyn_end);
+ debug("Section .rela.dyn is located at %08x-%08x\n",
+ (unsigned int)re_src, (unsigned int)re_end);
+
Elf32_Addr *offset_ptr_rom, *last_offset = NULL;
Elf32_Addr *offset_ptr_ram;
@@ -52,6 +55,10 @@ int do_elf_reloc_fixups(void)
offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
gd->reloc_off);
+ debug("Patching value @ %08x (relocated to %08x)\n",
+ (unsigned int)offset_ptr_rom,
+ (unsigned int)offset_ptr_ram);
+
/*
* Use "memcpy" because target location might be
* 16-bit aligned on ARC so we may need to read