summaryrefslogtreecommitdiff
path: root/arch/arc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/lib/relocate.c6
-rw-r--r--arch/arc/lib/start.S8
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 7802f40545..96b4bd3d8f 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -17,6 +17,9 @@ int copy_uboot_to_ram(void)
{
size_t len = (size_t)&__image_copy_end - (size_t)&__image_copy_start;
+ if (gd->flags & GD_FLG_SKIP_RELOC)
+ return 0;
+
memcpy((void *)gd->relocaddr, (void *)&__image_copy_start, len);
return 0;
@@ -40,6 +43,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);
+ if (gd->flags & GD_FLG_SKIP_RELOC)
+ return 0;
+
debug("Section .rela.dyn is located at %08x-%08x\n",
(unsigned int)re_src, (unsigned int)re_end);
diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S
index ac9944c4cf..c78dd001d8 100644
--- a/arch/arc/lib/start.S
+++ b/arch/arc/lib/start.S
@@ -78,7 +78,13 @@ ENTRY(_start)
/* Zero the one and only argument of "board_init_f" */
mov_s %r0, 0
- j board_init_f
+ bl board_init_f
+
+ /* We only get here if relocation is disabled by GD_FLG_SKIP_RELOC */
+ /* Make sure we don't lose GD overwritten by zero new GD */
+ mov %r0, %r25
+ mov %r1, 0
+ bl board_init_r
ENDPROC(_start)
/*