summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2007-02-03 00:55:35 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2007-02-03 00:55:35 +0000
commita05a98733ba6bd0f869f65e500aab960717b82c0 (patch)
tree44e74d444bb3f7de1cbe3e66a46178605bcda01a /libexec
parentd8b0f9d5e7b7b71dd72ec0e4ea0eb361a89222e0 (diff)
Kludge around a horrible problem where gcc 'knows' that __udivsi3 will
only clobber r0 and r4, and will not modify any other registers. Unfortunately calling thru the PLT clobbers other registers eg, r1, which then breaks because gcc doesn't reload the proper value.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.so/sh/rtld_machine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libexec/ld.so/sh/rtld_machine.c b/libexec/ld.so/sh/rtld_machine.c
index 2868c3e70f9..c6eba2e1736 100644
--- a/libexec/ld.so/sh/rtld_machine.c
+++ b/libexec/ld.so/sh/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.4 2006/11/11 23:04:50 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.5 2007/02/03 00:55:34 drahn Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -666,12 +666,20 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz)
value += loff;
} else {
this = NULL;
+#if 0
ooff = _dl_find_symbol_bysym(object,
ELF_R_SYM(rels->r_info), &this,
SYM_SEARCH_ALL|SYM_WARNNOTFOUND|
((type == R_TYPE(JMP_SLOT)) ?
SYM_PLT : SYM_NOTPLT),
sym, NULL);
+#else
+ ooff = _dl_find_symbol_bysym(object,
+ ELF_R_SYM(rels->r_info), &this,
+ SYM_SEARCH_ALL|SYM_WARNNOTFOUND|
+ SYM_PLT,
+ sym, NULL);
+#endif
if (this == NULL) {
resolve_failed:
if (ELF_ST_BIND(sym->st_info) !=