Commit fa28bd2eef588ec2048ccafedb2b384d5a355858

Authored by Daniel Schwierzeck
Committed by Wolfgang Denk
1 parent 4fc823ddb4

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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

... ... @@ -475,6 +475,12 @@
475 475 cmdtp->help = (char *)addr;
476 476 }
477 477 #endif
  478 +#ifdef CONFIG_AUTO_COMPLETE
  479 + if (cmdtp->complete) {
  480 + addr = (ulong)(cmdtp->complete) + gd->reloc_off;
  481 + cmdtp->complete = (char *)addr;
  482 + }
  483 +#endif
478 484 cmdtp++;
479 485 }
480 486 }