Conditionally perform common relocation fixups

Add #ifdefs where necessary to not perform relocation fixups.  This
allows boards/architectures which support relocation to trim a decent
chunk of code.

Note that this patch doesn't add #ifdefs to architecture-specific code
which does not support relocation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 365ceeb..8f83598 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -561,7 +561,6 @@
 /*******************************************************************/
 /* bootm - boot application image from image in memory */
 /*******************************************************************/
-static int relocated = 0;
 
 int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
@@ -569,6 +568,8 @@
 	ulong		load_end = 0;
 	int		ret;
 	boot_os_fn	*boot_fn;
+#ifndef CONFIG_RELOC_FIXUP_WORKS
+	static int relocated = 0;
 
 	/* relocate boot function table */
 	if (!relocated) {
@@ -578,6 +579,7 @@
 				boot_os[i] += gd->reloc_off;
 		relocated = 1;
 	}
+#endif
 
 	/* determine if we have a sub command */
 	if (argc > 1) {