summaryrefslogtreecommitdiff
path: root/libexec/ld.so/sparc
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-12-18 19:21:02 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-12-18 19:21:02 +0000
commit29d2e9a7f2313652b63884678ea2b63bd7170c38 (patch)
tree0c2e8a56edcb9f7f1762935b9e59f4a4811df188 /libexec/ld.so/sparc
parent8f09080005732280987e9c3a5d4dfb4b7ff1d0ff (diff)
Remove pointless 'if 0' code.
Diffstat (limited to 'libexec/ld.so/sparc')
-rw-r--r--libexec/ld.so/sparc/rtld_machine.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libexec/ld.so/sparc/rtld_machine.c b/libexec/ld.so/sparc/rtld_machine.c
index 48c16f7fe98..9e630647de4 100644
--- a/libexec/ld.so/sparc/rtld_machine.c
+++ b/libexec/ld.so/sparc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.11 2002/12/18 19:20:02 drahn Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.12 2002/12/18 19:21:01 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -359,26 +359,18 @@ _dl_bind(elf_object_t *object, Elf_Word reloff)
if (object->plt_addr != NULL && object->plt_size != 0) {
sigfillset(&nmask);
_dl_sigprocmask(SIG_BLOCK, &nmask, &omask);
-#if 0
- _dl_mprotect((void*)object->plt_addr, object->plt_size,
- PROT_READ|PROT_WRITE|PROT_EXEC);
-#else
+ /* mprotect the actual modified region, not the whole plt */
_dl_mprotect((void*)addr,sizeof (Elf_Addr) * 3,
PROT_READ|PROT_WRITE|PROT_EXEC);
-#endif
}
_dl_reloc_plt(addr, value);
/* if PLT is (to be protected, change back to RO/X */
if (object->plt_addr != NULL && object->plt_size != 0) {
-#if 0
- _dl_mprotect((void*)object->plt_addr, object->plt_size,
- PROT_READ|PROT_EXEC);
-#else
+ /* mprotect the actual modified region, not the whole plt */
_dl_mprotect((void*)addr,sizeof (Elf_Addr) * 3,
PROT_READ|PROT_EXEC);
-#endif
_dl_sigprocmask(SIG_SETMASK, &omask, NULL);
}