Convince compilers to put constant data into the .rodata section

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

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

Corresponding to flashrom svn r1252.

Signed-off-by: Mathias Krause <>
Acked-by: Stefan Reinauer <>
8 files changed