Without this, u-boot can crash or print garbage if the original link
address no longer points to a valid string.
Signed-off-by: Scott Wood <scottwood@freescale.com>
{
for (; table->id >= 0; ++table) {
if (table->id == id)
- return (table->lname);
+#ifdef USE_HOSTCC
+ return table->lname;
+#else
+ return table->lname + gd->reloc_off;
+#endif
}
return (msg);
}
fprintf (stderr, "\n");
#else
for (t = table; t->id >= 0; ++t) {
- if (t->sname && strcmp(t->sname, name) == 0)
+ if (t->sname && strcmp(t->sname + gd->reloc_off, name) == 0)
return (t->id);
}
debug ("Invalid %s Type: %s\n", table_name, name);