summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2019-04-13 03:15:25 +0000
committerchristos <christos@NetBSD.org>2019-04-13 03:15:25 +0000
commit38083dce2b980075025617eccc767231ea5c9d7c (patch)
tree144949b88b760533415df8cd9a6b739ed21a7374 /libexec
parent5f2053f06549a60d0bc1e697cd77663774ea1338 (diff)
Fix c++ exceptions on arm; jemalloc calls _rtld_tls_get_addr from inside
dl_iterate_phdr, so we need to unlock and relock.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.elf_so/rtld.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.elf_so/rtld.c b/libexec/ld.elf_so/rtld.c
index ff45dacaf37..11b176efee6 100644
--- a/libexec/ld.elf_so/rtld.c
+++ b/libexec/ld.elf_so/rtld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.195 2018/12/30 01:48:37 christos Exp $ */
+/* $NetBSD: rtld.c,v 1.196 2019/04/13 03:15:25 christos Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.195 2018/12/30 01:48:37 christos Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.196 2019/04/13 03:15:25 christos Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -1462,7 +1462,9 @@ dl_iterate_phdr(int (*callback)(struct dl_phdr_info *, size_t, void *), void *pa
phdr_info.dlpi_subs = _rtld_objloads - _rtld_objcount;
/* XXXlocking: exit point */
+ _rtld_shared_exit();
error = callback(&phdr_info, sizeof(phdr_info), param);
+ _rtld_shared_enter();
if (error)
break;
}