[coreboot] [PATCH]Avoid globals in romstage
Stefan Reinauer
stefan.reinauer at coresystems.de
Sat Sep 25 16:13:54 CEST 2010
On 9/25/10 1:52 PM, Patrick Georgi wrote:
> attached patch makes globals in romstage a build breaking condition,
> given that .bss and .data are allocated in ROM areas (ie. non-writable)
> this is provides some protection against certain coding errors.
>
>
> Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
> Index: src/arch/i386/init/ldscript_fallback_cbfs.lb
> ===================================================================
> --- src/arch/i386/init/ldscript_fallback_cbfs.lb (Revision 5839)
> +++ src/arch/i386/init/ldscript_fallback_cbfs.lb (Arbeitskopie)
> @@ -49,4 +49,5 @@
> *(.comment.*)
> *(.note.*)
> }
> + _bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use global variables in romstage");
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100925/ea2fd320/attachment.html>
More information about the coreboot
mailing list