summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-01-11 13:13:28 +0100
committerFlorian Weimer <fweimer@redhat.com>2018-01-11 13:13:28 +0100
commit08c6e95234c60a5c2f37532d1111acf084f39345 (patch)
treed9137425f1534148d0f714a401896159f2c7addd /sysdeps
parentd8b778907e5270fdeb70459842ffbc20bd2ca5e1 (diff)
csu: Update __libgcc_s_init comment
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/gnu/unwind-resume.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c
index 94704c9a2b..7f9a1bf2c7 100644
--- a/sysdeps/gnu/unwind-resume.c
+++ b/sysdeps/gnu/unwind-resume.c
@@ -35,13 +35,17 @@ __libgcc_s_init (void)
void *resume, *personality;
void *handle;
- handle = __libc_dlopen (LIBGCC_S_SO);
+ /* Use RTLD_NOW here for consistency with pthread_cancel_init.
+ RTLD_NOW will rarely make a difference here because unwinding is
+ already in progress, so libgcc_s.so has already been loaded if
+ its unwinder is used. */
+ handle = __libc_dlopen_mode (LIBGCC_S_SO, RTLD_NOW | __RTLD_DLOPEN);
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
|| (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
__libc_fatal (LIBGCC_S_SO
- " must be installed for pthread_cancel to work\n");
+ " must be installed for unwinding to work\n");
#ifdef PTR_MANGLE
PTR_MANGLE (resume);