summaryrefslogtreecommitdiff
path: root/ldso/ldso/ldso.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-12-17 08:05:44 +0000
committerEric Andersen <andersen@codepoet.org>2003-12-17 08:05:44 +0000
commit0a0a648ed65342e7bb71608894c308bfb6143a4d (patch)
tree5b9bb5746fdf2c4384c3bf57dd3ca3bb6ce804c8 /ldso/ldso/ldso.c
parente2ec80efb27158e6a367238227ddca876054ae9e (diff)
Patch from Paul Mundt <lethal@linux-sh.org>:
For sh64 we need implicit access to the symtab, primarily to get at the ->st_other value. This presently isn't possible, as PERFORM_BOOTSTRAP_RELOC() is invoked as such: PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr); while we can easily get the symtab_index value from rpnt->r_info, this still doesn't buy us easy access to the actual table. As such, I've modified PERFORM_BOOTSTRAP_RELOC() to take an additional SYMTAB argument. Most architectures aren't going to care about this, but unfortunately we don't have any other options for sh64. The following patch fixes up the API for what we need for sh64, and updates the other architectures appropriately.
Diffstat (limited to 'ldso/ldso/ldso.c')
-rw-r--r--ldso/ldso/ldso.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index a5826b671..601da6283 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -287,7 +287,7 @@ LD_BOOT(unsigned long args)
__asm__("\tbl _GLOBAL_OFFSET_TABLE_-4@local\n\t":"=l"(got));
#elif defined(__mips__)
__asm__("\tmove %0, $28\n\tsubu %0,%0,0x7ff0\n\t":"=r"(got));
-#elif defined(__sh__)
+#elif defined(__sh__) && !defined(__SH5__)
__asm__(
" mov.l 1f, %0\n"
" mova 1f, r0\n"
@@ -583,11 +583,13 @@ LD_BOOT(unsigned long args)
SEND_STDERR(strtab + symtab[symtab_index].st_name);
SEND_STDERR("\n");
#endif
+ PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr, &symtab[symtab_index]);
+ } else {
+ /*
+ * Use this machine-specific macro to perform the actual relocation.
+ */
+ PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr, NULL);
}
- /*
- * Use this machine-specific macro to perform the actual relocation.
- */
- PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr);
}
}