From 521af04d853361b49344b61892eb0618f9f713c5 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 21 Sep 2009 11:20:36 -0500 Subject: 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 --- common/image.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/image.c') diff --git a/common/image.c b/common/image.c index d0f169d660..6eaf41eb13 100644 --- a/common/image.c +++ b/common/image.c @@ -513,7 +513,7 @@ char *get_table_entry_name (table_entry_t *table, char *msg, int id) { for (; table->id >= 0; ++table) { if (table->id == id) -#ifdef USE_HOSTCC +#if defined(USE_HOSTCC) || defined(CONFIG_RELOC_FIXUP_WORKS) return table->lname; #else return table->lname + gd->reloc_off; @@ -578,7 +578,11 @@ int get_table_entry_id (table_entry_t *table, fprintf (stderr, "\n"); #else for (t = table; t->id >= 0; ++t) { +#ifdef CONFIG_RELOC_FIXUP_WORKS + if (t->sname && strcmp(t->sname, name) == 0) +#else if (t->sname && strcmp(t->sname + gd->reloc_off, name) == 0) +#endif return (t->id); } debug ("Invalid %s Type: %s\n", table_name, name); -- cgit v1.2.1