Skip to contentSkip to conversation

question on do_bootm()

U-Boot J.Hwan.Kim 1 participant 1 message Jun 17, 2009

lore
Share & tools
lore

J.Hwan.Kim

author
#0 lore raw

Hi, everyone

I have a question on relocation of boot function table in do_bootm(). The boot function table boot_os[] has a pointer of functions such as do_bootm_linux().
I think the address of the symbol "do_bootm_linux" has relocated address by linker.
But there is address-modifying routine in do_bootm()
if (!relocated) {
int i;
for (i = 0; i < ARRAY_SIZE(boot_os); i++)
boot_os[i] += gd->reloc_off;
relocated = 1;
}

Why the routine above is needed?
Isn't the addresses of boot functions already relocated one?

Thanks in advance.

Regards,
J.H.Kim