summaryrefslogtreecommitdiff
path: root/libexec/ld.so/alpha/rtld_machine.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-05-02 04:57:02 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-05-02 04:57:02 +0000
commit64bbd9e4628abe8823de2913a59d94d90d53e524 (patch)
treed0cb7c94b69ee863c7bf83e9259e9b2a17deb654 /libexec/ld.so/alpha/rtld_machine.c
parentb4b6194a60b2e4ac571bb4b5a0ce6d006f8d9a32 (diff)
Combine the signal mask handling into _dl_thread_bind_lock(), as it's MI.
ok drahn@
Diffstat (limited to 'libexec/ld.so/alpha/rtld_machine.c')
-rw-r--r--libexec/ld.so/alpha/rtld_machine.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c
index 4d72f51c7fd..ac97fd3b583 100644
--- a/libexec/ld.so/alpha/rtld_machine.c
+++ b/libexec/ld.so/alpha/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.43 2008/07/28 22:11:00 kurt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.44 2010/05/02 04:57:01 guenther Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -172,7 +172,7 @@ _dl_bind(elf_object_t *object, int reloff)
Elf_Addr *addr, ooff;
const Elf_Sym *sym, *this;
const char *symn;
- sigset_t omask, nmask;
+ sigset_t savedmask;
rela = (Elf_RelA *)(object->Dyn.info[DT_JMPREL] + reloff);
@@ -202,9 +202,7 @@ _dl_bind(elf_object_t *object, int reloff)
/* if PLT is protected, allow the write */
if (object->plt_size != 0) {
- sigfillset(&nmask);
- _dl_sigprocmask(SIG_BLOCK, &nmask, &omask);
- _dl_thread_bind_lock(0);
+ _dl_thread_bind_lock(0, &savedmask);
_dl_mprotect(addr, sizeof(Elf_Addr),
PROT_READ|PROT_WRITE);
}
@@ -215,8 +213,7 @@ _dl_bind(elf_object_t *object, int reloff)
if (object->plt_size != 0) {
_dl_mprotect(addr, sizeof(Elf_Addr),
PROT_READ);
- _dl_thread_bind_lock(1);
- _dl_sigprocmask(SIG_SETMASK, &omask, NULL);
+ _dl_thread_bind_lock(1, &savedmask);
}
return *addr;