summaryrefslogtreecommitdiff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-01-10 13:18:04 +0100
committerFlorian Weimer <fweimer@redhat.com>2018-01-10 13:18:04 +0100
commitf993b8754080ac7572b692870e926d8b493db16c (patch)
tree3ab333e5264a3bbcc4d913ef9fc306cc7759773a /sysdeps/nptl
parent09085ede12fb9650f286bdcd805609ae69f80618 (diff)
downloadglibc-f993b8754080ac7572b692870e926d8b493db16c.tar.gz
nptl: Open libgcc.so with RTLD_NOW during pthread_cancel [BZ #22636]
Disabling lazy binding reduces stack usage during unwinding. Note that RTLD_NOW only makes a difference if libgcc.so has not already been loaded, so this is only a partial fix. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/unwind-forcedunwind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/nptl/unwind-forcedunwind.c b/sysdeps/nptl/unwind-forcedunwind.c
index ab4350de99..67b8e74b53 100644
--- a/sysdeps/nptl/unwind-forcedunwind.c
+++ b/sysdeps/nptl/unwind-forcedunwind.c
@@ -49,7 +49,7 @@ pthread_cancel_init (void)
return;
}
- handle = __libc_dlopen (LIBGCC_S_SO);
+ handle = __libc_dlopen_mode (LIBGCC_S_SO, RTLD_NOW | __RTLD_DLOPEN);
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL