diff options
Diffstat (limited to 'libexec/ld.so/sparc')
-rw-r--r-- | libexec/ld.so/sparc/rtld_machine.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/sparc/rtld_machine.c b/libexec/ld.so/sparc/rtld_machine.c index f14d49a69b1..cc3489b37bc 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.27 2006/10/28 16:06:05 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.28 2007/05/05 15:21:21 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -340,6 +340,7 @@ _dl_bind(elf_object_t *object, int reloff) if (object->plt_size != 0) { sigfillset(&nmask); _dl_sigprocmask(SIG_BLOCK, &nmask, &omask); + _dl_thread_bind_lock(0); /* mprotect the actual modified region, not the whole plt */ _dl_mprotect((void*)addr, sizeof (Elf_Addr) * 3, PROT_READ|PROT_WRITE|PROT_EXEC); @@ -352,6 +353,7 @@ _dl_bind(elf_object_t *object, int reloff) /* mprotect the actual modified region, not the whole plt */ _dl_mprotect((void*)addr, sizeof (Elf_Addr) * 3, PROT_READ|PROT_EXEC); + _dl_thread_bind_lock(1); _dl_sigprocmask(SIG_SETMASK, &omask, NULL); } |