[U-Boot] [PATCH] cmd_elf: CONFIG_ELF_SIMPLE_LOAD: load ELFs according to PHDRs

Wolfgang Denk wd at denx.de
Fri Dec 5 23:21:27 CET 2008


Dear Mike,

In message <1225603202-5757-1-git-send-email-vapier at gentoo.org> you wrote:
> The current ELF loading function does a lot of work above and beyond a
> simple "loading".  It ignores the real load addresses and loads things into
> their virtual (runtime) address.  This is undesirable when we just want it
> to load an ELF and let the ELF do the actual C runtime init.

I apologize for the late review...


> +#ifdef CONFIG_ELF_SIMPLE_LOAD
> +unsigned long load_elf_image (unsigned long addr)
...

...but would it not make sense to allow to make the decision which
behaviour fits the user's requirements at runtime instead of compile
time?

We could either make this depend on some environment variable setting,
or on a command line option when running the command.


If you prefer to stick with the CONFIG_ELF_SIMPLE_LOAD solution, then
this variable has to be documented in the README.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The Gates in my computer are AND, OR and NOT; they are not Bill.


More information about the U-Boot mailing list