diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-30 11:26:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-30 11:26:49 +0000 |
commit | 9dc1fb246253dfec90090d41fcc01e12bd95e6f8 (patch) | |
tree | 1eff2fc723305411115a085fac7ba8838356dc8a /libexec | |
parent | a5803d1822902f261331b9f5716f0d288ce34dd3 (diff) |
Fix handling of R_MIPS_REL32_64 relocations that reference a symbol.
Fixes remaining problems with static PIE on mips64.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/mips64/archdep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/ld.so/mips64/archdep.h b/libexec/ld.so/mips64/archdep.h index 95631b08c3f..ec34a50dec0 100644 --- a/libexec/ld.so/mips64/archdep.h +++ b/libexec/ld.so/mips64/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.8 2014/12/27 20:33:47 kettenis Exp $ */ +/* $OpenBSD: archdep.h,v 1.9 2014/12/30 11:26:48 kettenis Exp $ */ /* * Copyright (c) 1998-2002 Opsycon AB, Sweden. @@ -42,8 +42,8 @@ #define RELOC_REL(relp, symp, adrp, val) \ do { \ if (ELF64_R_TYPE(relp->r_info) == R_MIPS_REL32_64) { \ - if (ELF64_R_SYM(rp->r_info) != 0) \ - *adrp = symp->st_value + val; \ + if (ELF64_R_SYM(relp->r_info) != 0) \ + *adrp += symp->st_value + val; \ else \ *adrp += val; \ } else if (ELF64_R_TYPE(relp->r_info) != R_MIPS_NONE) { \ |