diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-01-02 12:16:36 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-01-02 12:16:36 +0000 |
commit | 4f326cf2825008ca1b36472028d1020626c5fec8 (patch) | |
tree | 6b2d9fff4f220ef42b68697b08c8035a41bc8439 /libexec/ld.so/hppa/archdep.h | |
parent | c687cfed448255b6460411891ac062c4d070679f (diff) |
Fix handling of hppa RELOC_IPLT relocations during 'bootstrap relocation'.
ok miod@, deraadt@, jsing@
Diffstat (limited to 'libexec/ld.so/hppa/archdep.h')
-rw-r--r-- | libexec/ld.so/hppa/archdep.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/ld.so/hppa/archdep.h b/libexec/ld.so/hppa/archdep.h index 83ce7ec38fc..250553bb42d 100644 --- a/libexec/ld.so/hppa/archdep.h +++ b/libexec/ld.so/hppa/archdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: archdep.h,v 1.4 2008/04/09 21:45:26 kurt Exp $ */ +/* $OpenBSD: archdep.h,v 1.5 2010/01/02 12:16:35 kettenis Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -74,13 +74,15 @@ RELOC_REL(Elf_Rel *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) * prepare to code around this problem, or fix it here. */ static inline void -RELOC_RELA(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v) +RELOC_RELA(Elf_RelA *r, const Elf_Sym *s, Elf_Addr *p, unsigned long v, + Elf_Addr *pltgot) { /* XXX fille out _sl ??? */ if (ELF_R_TYPE(r->r_info) == RELOC_DIR32) { *p = v + r->r_addend; } else if (ELF_R_TYPE(r->r_info) == RELOC_IPLT) { - *p = v + s->st_value + r->r_addend; + p[0] = v + s->st_value + r->r_addend; + p[1] = (Elf_Addr)pltgot; } else if (ELF_R_TYPE(r->r_info) == RELOC_PLABEL32) { *p = v + s->st_value + r->r_addend; } else { |