diff options
author | Daniel Schwierzeck <daniel.schwierzeck@googlemail.com> | 2011-10-13 06:07:39 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-15 22:19:36 +0200 |
commit | fa28bd2eef588ec2048ccafedb2b384d5a355858 (patch) | |
tree | 4297e2b0b5046a12f8e2f6692944a33d175b4a8b | |
parent | 4fc823ddb43ab26a393da49f356fcad208e7064f (diff) |
common: fix missing function pointer relocation in fixup_cmdtable()
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 <daniel.schwierzeck@googlemail.com>
-rw-r--r-- | common/command.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/command.c b/common/command.c index ddaed682d58..ed931d748c0 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++; } } |