diff options
author | Peter Tyser <ptyser@xes-inc.com> | 2009-09-21 11:20:36 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-10-03 10:17:57 +0200 |
commit | 521af04d853361b49344b61892eb0618f9f713c5 (patch) | |
tree | b5168e8f89074a797761a03c6bcf0c95ddfc5f12 /common/image.c | |
parent | 3cbcfa70b116df1bbdc90ba31c61adcaec058a8a (diff) | |
download | u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.zip u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.gz u-boot-imx-521af04d853361b49344b61892eb0618f9f713c5.tar.bz2 |
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>
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c index d0f169d..6eaf41e 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); |