mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
x86: Panic if there is no relocation data
This normally indicates a problem which will prevent relocation from functioning, resulting in a hang. Panic in this case to make it easier to debug. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
65990d5680
commit
512e581c86
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue