From: Daniel Schwierzeck Date: Thu, 13 Oct 2011 18:07:39 +0200 Subject: [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable() Message-ID: <1318522059-16182-1-git-send-email-daniel.schwierzeck@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The command auto-completion does not work on architectures relying on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable(). This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE is defined. Signed-off-by: Daniel Schwierzeck --- common/command.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/common/command.c b/common/command.c index ddaed68..ed931d7 100644 --- a/common/command.c +++ b/common/command.c @@ -475,6 +475,12 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size) cmdtp->help = (char *)addr; } #endif +#ifdef CONFIG_AUTO_COMPLETE + if (cmdtp->complete) { + addr = (ulong)(cmdtp->complete) + gd->reloc_off; + cmdtp->complete = (char *)addr; + } +#endif cmdtp++; } } -- 1.7.7