[coreboot] [PATCH] v3: Move stage1 global variable management from asm to C

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Aug 20 22:27:54 CEST 2008

On 20.08.2008 19:01, Segher Boessenkool wrote:
>> - Segher needs to review which attributes globvars needs to not be
>> optimized away.
> It doesn't need any: if it's used, it won't be optimised away;
> and if it isn't used, who cares :-)
> There could be an issue if you hid some facts from the compiler,
> but you didn't.

Thanks for checking this.

> The only remaining issue is, does that struct actually get
> allocated on the stack (and not in .data or similar)?  There is
> no way to force this AFAIK: C doesn't even know what a stack is,
> and there is no GCC extension for this.  But don't worry too
> much about this, every compiler we use does in fact put this on
> the stack.

I'm not too worried about that either. My v3 code correctness checker
complains if stage1 or initram use .bss or .data.



More information about the coreboot mailing list