Skip to content
Snippets Groups Projects
Commit ffffcd15 authored by Alexey Brodkin's avatar Alexey Brodkin
Browse files

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: default avatarAlexey Brodkin <abrodkin@synopsys.com>
parent e1efe43c
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,9 @@ int do_elf_reloc_fixups(void) ...@@ -37,6 +37,9 @@ int do_elf_reloc_fixups(void)
Elf32_Rela *re_src = (Elf32_Rela *)(&__rel_dyn_start); Elf32_Rela *re_src = (Elf32_Rela *)(&__rel_dyn_start);
Elf32_Rela *re_end = (Elf32_Rela *)(&__rel_dyn_end); 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_rom, *last_offset = NULL;
Elf32_Addr *offset_ptr_ram; Elf32_Addr *offset_ptr_ram;
...@@ -52,6 +55,10 @@ int do_elf_reloc_fixups(void) ...@@ -52,6 +55,10 @@ int do_elf_reloc_fixups(void)
offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom + offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
gd->reloc_off); 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 * Use "memcpy" because target location might be
* 16-bit aligned on ARC so we may need to read * 16-bit aligned on ARC so we may need to read
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment