[LinuxBIOS] patch: extending LAR, and removing elf from linuxbios (it is not needed)

ron minnich rminnich at gmail.com
Tue Aug 28 17:29:04 CEST 2007

On 8/28/07, Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> Can't we do that in an easier way? Idea:
> struct {
>         char misalign[1];
>         char magic[8];
> } lar_magic __attribute__ ((aligned(16))) = {
>         0, "LARCHIVE"
> };
> That should guarantee the string to be always misaligned.

My personal preference is not to depend on this type of magic. The fix
I posted is really impossible to fail, and we want to guarantee no
failure in this important case.

Stefan's comment about not doing stupid brute force is a good point. I
am at fault for putting that in, but I did that because in the early
days there were bugs in linuxbios LAR parsing code ... we need to take
out the brute force.



More information about the coreboot mailing list