summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-08-21 10:19:25 -0600
committerTom Rini <[email protected]>2024-08-26 14:06:08 -0600
commit66ca5b78640578d6176031b3cc1018dc4e550dd3 (patch)
tree9ea8c5d1803c7c8ad48e1db03b2965912d5cc30b /lib
parentd9902107027a41fc6a27b10f6e030c5a2465936b (diff)
global_data: Remove environment members if not used
If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/asm-offsets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 4e2dbda9a71..b6bbcbf76ca 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -44,7 +44,9 @@ int main(void)
DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
DEFINE(GD_ENV_ADDR, offsetof(struct global_data, env_addr));
+#endif
return 0;
}