[flashrom] Minor Code cleanup resulting in a smaller binary

Mathias Krause mathias.krause at secunet.com
Wed Jan 5 13:03:34 CET 2011

This patch reduces the stack usage by declaring 'const' stack variables
as 'static const' so they end up in the .rodata section instead of being
copied from there to the stack for every invocation of the corresponding
function. As a plus we end up in having a smaller binary as the "copy
from .rodata to stack" code isn't emitted by the compiler any more
(roughly -100 bytes).

Signed-off-by: Mathias Krause <mathias.krause at secunet.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static_const.diff
Type: text/x-patch
Size: 8227 bytes
Desc: not available
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20110105/459d7caf/attachment.diff>

More information about the flashrom mailing list