common: always compile fixup_cmdtable()
PATCH 1/1 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.
--- common/command.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
common/command.c +2 -4
@@ -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)
--
2.29.2
PATCH 1/1 common: always compile fixup_cmdtable()
Quoted 12 lines · Heinrich Schuchardt
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 bydm_reloc()and others.Signed-off-by Heinrich Schuchardt <[email protected]>--- common/command.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
PATCH 1/1 common: always compile fixup_cmdtable()
In reply to Heinrich SchuchardtQuoted 8 lines · Heinrich Schuchardt
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 bydm_reloc()and others.Signed-off-by Heinrich Schuchardt <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210118/266d0c93/attachment.sig>