[coreboot] ELF

Peter Stuge peter at stuge.se
Mon Apr 14 00:46:10 CEST 2008

On Mon, Apr 14, 2008 at 12:09:07AM +0200, Segher Boessenkool wrote:
> So my base is *not* "ELF is best", but it is "ELF is just fine for
> this, so why would we need another format, with all infrastructure
> overhead that requires?".  So please start by explaining what is
> bad, or even just sub-optimal, in using ELF here.

This is my take;

The problem in the past has been that ELFs have gone into flash
(.rom) with structures that failed at run time in part because of
the coreboot ELF loader and in part because of the somewhat
constrained environment.

All files going into a .rom will go through lar, so I want lar to do
any and all processing that is neccessary. It does not have to be
internal code, it can be a library, or even an external helper, but
my major concern is not needing to run any extra commands.

I expect to be able to put vmlinux straight into flash (.rom file)
using lar. I specifically do not want a separate ELF chewer. That was
mkelfImage. I don't hate mkelfImage in any way but I want to avoid
that extra step in lar.

I also expect to be able to extract said vmlinux from one flash (.rom
file), store it on disk (but not use it) and later write it into
another flash (.rom file).

ELF pros:
Much code that can be reused

Complex, code we've used so far has not been robust enough
(Maybe we were just shooting our SELF in the foot by not being
explicit enough about how lar member ELFs should be formatted?)

Regardless of what internal format we decide on for lar members,
I do wish lar to automatically reformat vmlinux and other ELFs as
they are inserted into lars. I envision lar plugins for all sorts
of binaries.


More information about the coreboot mailing list