diff options
Diffstat (limited to 'arch/arc/lib/relocate.c')
-rw-r--r-- | arch/arc/lib/relocate.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c index 5c2c2d1..7802f40 100644 --- a/arch/arc/lib/relocate.c +++ b/arch/arc/lib/relocate.c @@ -6,7 +6,10 @@ #include <common.h> #include <elf.h> -#include <asm/sections.h> +#include <asm-generic/sections.h> + +extern ulong __image_copy_start; +extern ulong __ivt_end; DECLARE_GLOBAL_DATA_PTR; @@ -37,6 +40,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 +58,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 |