summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-07-03 11:15:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-07-03 11:15:56 +0000
commitf90a70cd034635fe7ca769df0b78e82a71002339 (patch)
tree5d8c2ddf0452f9bbaa3f4bc8149bb31a0caa7686 /libexec/ld.so
parente595f8733c18b21303fdf4133cc7b6aacaeda353 (diff)
Correctly handle relative-type relocations; very old ld.so bug which got
fixed everywhere but on sparc for some unknown reason (and did not cause any havoc in real life).
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/sparc/archdep.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/sparc/archdep.h b/libexec/ld.so/sparc/archdep.h
index cf3c03743a6..4e967144cb7 100644
--- a/libexec/ld.so/sparc/archdep.h
+++ b/libexec/ld.so/sparc/archdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: archdep.h,v 1.10 2014/11/03 17:50:56 guenther Exp $ */
+/* $OpenBSD: archdep.h,v 1.11 2015/07/03 11:15:55 miod Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -64,7 +64,7 @@ RELOC_RELA(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v,
{
if (ELF_R_TYPE(r->r_info) == R_TYPE(NONE)) {
} else if (ELF_R_TYPE(r->r_info) == R_TYPE(RELATIVE)) {
- *p += v + r->r_addend;
+ *p = v + r->r_addend;
} else {
/* XXX - printf might not work here, but we give it a shot. */
_dl_printf("Unknown bootstrap relocation.\n");