summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2007-02-03 00:55:34 +0000
committerdrahn <drahn@openbsd.org>2007-02-03 00:55:34 +0000
commit27da5a506ebe27b74947cf61cd9b8c9ba4fa7bc4 (patch)
tree2416db92bda1c8afed35b4ce30098951e9c0dcce
parentUpdate to tzdata2007a from elsie.nci.nih.gov (diff)
downloadwireguard-openbsd-27da5a506ebe27b74947cf61cd9b8c9ba4fa7bc4.tar.xz
wireguard-openbsd-27da5a506ebe27b74947cf61cd9b8c9ba4fa7bc4.zip
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.
-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) !=