diff options
| author | junyoung <junyoung@NetBSD.org> | 2002-11-21 19:09:56 +0000 |
|---|---|---|
| committer | junyoung <junyoung@NetBSD.org> | 2002-11-21 19:09:56 +0000 |
| commit | b5ffe4c33cd11ca403c8395255c9db479dedaaa7 (patch) | |
| tree | 38f513335d0c29fae817188563e654e0739e1de7 /libexec | |
| parent | b863b83c827c124a7324da2787ceea389d125ce0 (diff) | |
Simplify code a bit.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.elf_so/reloc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libexec/ld.elf_so/reloc.c b/libexec/ld.elf_so/reloc.c index 5dad8af45f9..8212a61ddfd 100644 --- a/libexec/ld.elf_so/reloc.c +++ b/libexec/ld.elf_so/reloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.74 2002/09/26 20:42:10 mycroft Exp $ */ +/* $NetBSD: reloc.c,v 1.75 2002/11/21 19:09:56 junyoung Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -153,7 +153,7 @@ _rtld_relocate_objects(first, bind_now) bool bind_now; { Obj_Entry *obj; - int ok = 1; + int res; for (obj = first; obj != NULL; obj = obj->next) { if (obj->nbuckets == 0 || obj->nchains == 0 || @@ -183,8 +183,7 @@ _rtld_relocate_objects(first, bind_now) } } dbg(("doing non-PLT relocations")); - if (_rtld_relocate_nonplt_objects(obj) < 0) - ok = 0; + res = _rtld_relocate_nonplt_objects(obj); if (obj->textrel) { /* Re-protected the text segment. */ if (mprotect(obj->mapbase, obj->textsize, PROT_READ | PROT_EXEC) == -1) { @@ -194,14 +193,12 @@ _rtld_relocate_objects(first, bind_now) } } dbg(("doing lazy PLT binding")); - if (_rtld_relocate_plt_lazy(obj) < 0) - ok = 0; + res = _rtld_relocate_plt_lazy(obj); #if defined(__i386__) if (bind_now) - if (_rtld_relocate_plt_objects(obj) < 0) - ok = 0; + res = _rtld_relocate_plt_objects(obj); #endif - if (!ok) + if (res < 0) return -1; |
