diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-27 16:42:20 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-27 16:42:20 +0000 |
commit | 33f3250176ebfd4d01c91b64a2db9a4281295ffc (patch) | |
tree | e9178cca85e50cc6aedcab0259fcf0ed91339151 /libexec/ld.so/hppa | |
parent | 71abb69ad5b56f2815e077a3ef725973b5a7e280 (diff) |
Make _dl_md_reloc_got() report errors, and take them into account.
Fixes PR #5579.
Diffstat (limited to 'libexec/ld.so/hppa')
-rw-r--r-- | libexec/ld.so/hppa/rtld_machine.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libexec/ld.so/hppa/rtld_machine.c b/libexec/ld.so/hppa/rtld_machine.c index bc3a2d56cd8..47f2e7bab03 100644 --- a/libexec/ld.so/hppa/rtld_machine.c +++ b/libexec/ld.so/hppa/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.13 2007/05/05 15:21:21 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.14 2007/11/27 16:42:19 miod Exp $ */ /* * Copyright (c) 2004 Michael Shalayeff @@ -285,16 +285,16 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) return (fails); } -void +int _dl_md_reloc_got(elf_object_t *object, int lazy) { Elf_RelA *rela; Elf_Addr ooff; - int i, numrela; + int i, numrela, fails = 0; const Elf_Sym *this; if (object->dyn.pltrel != DT_RELA) - return; + return (0); lazy = 0; /* force busy binding */ @@ -321,7 +321,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) } if (!lazy) { - _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ); + fails = _dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ); } else { rela = (Elf_RelA *)(object->dyn.jmprel); numrela = object->dyn.pltrelsz / sizeof(Elf_RelA); @@ -343,6 +343,8 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) if (object->got_size != 0) _dl_mprotect((void *)object->got_start, object->got_size, GOT_PERMS); + + return (fails); } /* |