diff options
author | Heinrich Schuchardt | 2020-11-26 20:46:37 +0100 |
---|---|---|
committer | Tom Rini | 2021-01-16 14:49:09 -0500 |
commit | 7cf5b4053b433ae0dbb0462e58fd426b43fc69fd (patch) | |
tree | 34185de3f7813a16f856c30b8a648fbf4b1eb8d0 | |
parent | c61b2bf30c090b19cb2e84a7cf6e29de8773a411 (diff) |
common: always compile fixup_cmdtable()
With our optimization settings the linker eliminates unused functions.
But for debugging it is better to compile with -Og or -O0. With -O0
compiling the sandbox fails due to the missing function fixup_cmdtable()
called by dm_reloc() and others.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/command.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/command.c b/common/command.c index 068cb55b4cd..3fe6791edaa 100644 --- a/common/command.c +++ b/common/command.c @@ -16,6 +16,8 @@ #include <log.h> #include <linux/ctype.h> +DECLARE_GLOBAL_DATA_PTR; + /* * Use puts() instead of printf() to avoid printf buffer overflow * for long help messages @@ -488,9 +490,6 @@ int cmd_get_data_size(char* arg, int default_size) } #endif -#if defined(CONFIG_NEEDS_MANUAL_RELOC) -DECLARE_GLOBAL_DATA_PTR; - void fixup_cmdtable(struct cmd_tbl *cmdtp, int size) { int i; @@ -535,7 +534,6 @@ void fixup_cmdtable(struct cmd_tbl *cmdtp, int size) cmdtp++; } } -#endif int cmd_always_repeatable(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int *repeatable) |