summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-20 06:01:57 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-26 20:56:29 +0000
commit117cf2bdcbbadb3b30c9c250130f82f5e6edc236 (patch)
treeb6b3ebea04e865439082118a2c5b90aec2f342c1 /src/lib
parentf2cc52b694d610ffc4f1edc347bf38caec2e31b6 (diff)
Split MAYBE_STATIC to _BSS and _NONZERO variants
These are required to cover the absensce of .data and .bss sections in some programs, most notably ARCH_X86 in execute-in-place with cache-as-ram. Change-Id: I80485ebac94b88c5864a949b17ad1dccdfda6a40 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35003 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/lzma.c2
-rw-r--r--src/lib/timestamp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/lzma.c b/src/lib/lzma.c
index eecbb267d2..71c016ebcd 100644
--- a/src/lib/lzma.c
+++ b/src/lib/lzma.c
@@ -26,7 +26,7 @@ size_t ulzman(const void *src, size_t srcn, void *dst, size_t dstn)
int res;
CLzmaDecoderState state;
SizeT mallocneeds;
- MAYBE_STATIC unsigned char scratchpad[15980];
+ MAYBE_STATIC_BSS unsigned char scratchpad[15980];
const unsigned char *cp;
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 1319b86670..89152fd264 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -128,7 +128,7 @@ static int timestamp_should_run(void)
static struct timestamp_table *timestamp_table_get(void)
{
- MAYBE_STATIC struct timestamp_table *ts_table = NULL;
+ MAYBE_STATIC_BSS struct timestamp_table *ts_table = NULL;
struct timestamp_cache *ts_cache;
if (ts_table != NULL)