[coreboot] seabios failure with v2 and -fomit-frame-pointer

ron minnich rminnich at gmail.com
Wed Mar 18 22:14:11 CET 2009

On Wed, Mar 18, 2009 at 2:08 PM, Kevin O'Connor <kevin at koconnor.net> wrote:

> The bug is in src/arch/i386/boot/boot.c.  The inline assembly in
> jmp_to_elf_entry uses the "g" flag to pass in parameters.  However,
> "g" allows gcc to use stack relative addressing of parameters.
> Unfortunately, the inline assembly modifies %esp - and thus the stack
> relative values become incorrect.
> As a guess, without -fomit-frame-pointer, gcc would pass use %ebp
> relative values and this wouldn't trigger - but regardless it is still
> a bug.

That's a mighty nice catch. This code has worked unchanged for a long
time -- it's amazing how something can just break on you like this.



More information about the coreboot mailing list