diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/relocs.h | 2 | ||||
-rw-r--r-- | arch/mips/lib/reloc.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/include/asm/relocs.h b/arch/mips/include/asm/relocs.h index 0987c4bb136..b9b0261f624 100644 --- a/arch/mips/include/asm/relocs.h +++ b/arch/mips/include/asm/relocs.h @@ -8,7 +8,7 @@ #ifndef __ASM_MIPS_RELOCS_H__ #define __ASM_MIPS_RELOCS_H__ -#define R_MIPS_NONE 0 +#define R_MIPS_NONE 0xbeef7531 #define R_MIPS_32 2 #define R_MIPS_26 4 #define R_MIPS_HI16 5 diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index ffc8c7a1b72..67c8af2f35a 100644 --- a/arch/mips/lib/reloc.c +++ b/arch/mips/lib/reloc.c @@ -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 */ |