X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fx86%2Flib%2Frelocate.c;h=b33586b54c0311a9b596cbcca23ed357ab78b3e0;hb=bceb9f0fc80c71b8b2a7371288199cdacca1bad9;hp=faca38fff4b0c9fc67f7cfaeaab6682b6340f81f;hpb=130aec779ad9a2e28dc9d42ca5b367b957f311d7;p=u-boot diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index faca38fff4..b33586b54c 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -76,6 +76,9 @@ int do_elf_reloc_fixups(void) /* The size of the region of u-boot that runs out of RAM. */ uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start; + if (re_src == re_end) + panic("No relocation data"); + do { /* Get the location from the relocation entry */ offset_ptr_rom = (Elf32_Addr *)re_src->r_offset;