diff options
Diffstat (limited to 'src/include/stddef.h')
-rw-r--r-- | src/include/stddef.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h index 7cae2e6dc8..a2c9c50cd2 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -35,11 +35,16 @@ typedef unsigned int wint_t; #define DEVTREE_CONST #endif -/* Work around non-writable data segment in execute-in-place romstage on x86. */ -#if defined(__PRE_RAM__) && CONFIG(ARCH_X86) -#define MAYBE_STATIC +#if ENV_STAGE_HAS_DATA_SECTION +#define MAYBE_STATIC_NONZERO static #else -#define MAYBE_STATIC static +#define MAYBE_STATIC_NONZERO +#endif + +#if ENV_STAGE_HAS_BSS_SECTION +#define MAYBE_STATIC_BSS static +#else +#define MAYBE_STATIC_BSS #endif #ifndef __ROMCC__ |