|
@@ -67,7 +67,7 @@ static unsigned long read_uint(uint8_t **buf)
|
|
|
* intentionally simple, and does the bare minimum needed to fixup the
|
|
|
* relocated U-Boot - in particular, it does not check for overflows.
|
|
|
*/
|
|
|
-static void apply_reloc(unsigned int type, void *addr, long off)
|
|
|
+static void apply_reloc(unsigned int type, void *addr, long off, uint8_t *buf)
|
|
|
{
|
|
|
uint32_t u32;
|
|
|
|
|
@@ -92,7 +92,8 @@ static void apply_reloc(unsigned int type, void *addr, long off)
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- panic("Unhandled reloc type %u\n", type);
|
|
|
+ panic("Unhandled reloc type %u (@ %p), bss used before relocation?\n",
|
|
|
+ type, buf);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -137,7 +138,7 @@ void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaddr)
|
|
|
break;
|
|
|
|
|
|
addr += read_uint(&buf) << 2;
|
|
|
- apply_reloc(type, (void *)addr, off);
|
|
|
+ apply_reloc(type, (void *)addr, off, buf);
|
|
|
}
|
|
|
|
|
|
/* Ensure the icache is coherent */
|