All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable()
@ 2011-10-13 16:07 Daniel Schwierzeck
  2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
  2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel Schwierzeck @ 2011-10-13 16:07 UTC (permalink / raw)
  To: u-boot

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>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-23 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 16:07 [U-Boot] [PATCH] common: fix missing function pointer relocation in fixup_cmdtable() Daniel Schwierzeck
2011-10-14 12:08 ` [U-Boot] [PATCH v2] " Daniel Schwierzeck
2011-10-18 21:12   ` [U-Boot] [PATCH v3] " Daniel Schwierzeck
2011-10-23 20:22     ` Wolfgang Denk
2011-10-15 20:19 ` [U-Boot] [PATCH] " Wolfgang Denk
2011-10-18 12:37   ` Daniel Schwierzeck
2011-10-18 20:20     ` Wolfgang Denk

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.