Acked-by: Stefan Reinauer <stepan@coresystems.de>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@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"); }