* [U-Boot] [PATCH] arc: Add debug messages during relocation fixups
@ 2016-08-04 11:08 Alexey Brodkin
2016-08-05 10:35 ` Alexey Brodkin
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Brodkin @ 2016-08-04 11:08 UTC (permalink / raw)
To: u-boot
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>
---
arch/arc/lib/relocate.c | 7 +++++++
1 file changed, 7 insertions(+)
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
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-05 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04 11:08 [U-Boot] [PATCH] arc: Add debug messages during relocation fixups Alexey Brodkin
2016-08-05 10:35 ` Alexey Brodkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox