[coreboot] LAR TODO

ron minnich rminnich at gmail.com
Sat Feb 16 19:22:29 CET 2008


On Feb 16, 2008 10:08 AM, Carl-Daniel Hailfinger
<c-d.hailfinger.devel.2006 at gmx.net> wrote:

> It should be reasonably easy tofind out which segment is bss (the one
> with compalgo "zeroes"), but I'm not so sure about data and code. Do we
> want any convention (code is always segment0, data is always segment1)?

and here is Stefan's point. Converting from ELF to LAR is not
information-preserving. LAR headers have less information.
The pre-parsing loses information that is in the ELF.

LAR headers do not save information as to code vs. data, etc.

Our choices are:
1. continue with ELF support (though I do not intend to ever use it :-)
2. extend the LAR headers to incorporate more ELF info
3. when we pre-parse ELF files, save the ELF program headers when we
create the LAR file (except .bss is a section header,
   ELF is really not a very good design in many ways)
4. Make the LAR headers ELF headers
5. Just make LAR itself be an ELF file. I mean, they're very similar anyway.

So, I think we back out Myle's patch, until we resolve this. Stefan
has a point. I still dislike ELF parsing in coreboot. The v2
code was not actually able to handle all ELF files; it had obscure
failure  modes. The v3 code is even more restrictive.

Unless we want to greatly grow the ELF code in coreboot, some
preprocessing is inevitable.

So, let's have the discussion!

ron




More information about the coreboot mailing list