* [PATCH 1/1] common: always compile fixup_cmdtable()
@ 2020-11-26 19:46 Heinrich Schuchardt
2020-11-30 20:12 ` Simon Glass
2021-01-18 13:01 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-11-26 19:46 UTC (permalink / raw)
To: u-boot
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>
---
common/command.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/common/command.c b/common/command.c
index 2c491e20a7..345846f165 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)
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 1/1] common: always compile fixup_cmdtable()
2020-11-26 19:46 [PATCH 1/1] common: always compile fixup_cmdtable() Heinrich Schuchardt
@ 2020-11-30 20:12 ` Simon Glass
2021-01-18 13:01 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-11-30 20:12 UTC (permalink / raw)
To: u-boot
On Thu, 26 Nov 2020 at 12:46, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> 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>
> ---
> common/command.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] common: always compile fixup_cmdtable()
2020-11-26 19:46 [PATCH 1/1] common: always compile fixup_cmdtable() Heinrich Schuchardt
2020-11-30 20:12 ` Simon Glass
@ 2021-01-18 13:01 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-01-18 13:01 UTC (permalink / raw)
To: u-boot
On Thu, Nov 26, 2020 at 08:46:37PM +0100, Heinrich Schuchardt wrote:
> 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>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-18 13:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26 19:46 [PATCH 1/1] common: always compile fixup_cmdtable() Heinrich Schuchardt
2020-11-30 20:12 ` Simon Glass
2021-01-18 13:01 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.