aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-01-11 13:13:28 +0100
committerAurelien Jarno <aurelien@aurel32.net>2018-12-28 15:13:27 +0100
commite853f05a5757dfee0c8b7f301e6a52047cc9864a (patch)
treefc3f873f4227a39294b772952c19675d83c3048e
parentd8d97c0539c4258ecf8d46a184e853acad577199 (diff)
downloadglibc-e853f05a5757dfee0c8b7f301e6a52047cc9864a.tar
glibc-e853f05a5757dfee0c8b7f301e6a52047cc9864a.tar.gz
glibc-e853f05a5757dfee0c8b7f301e6a52047cc9864a.tar.bz2
glibc-e853f05a5757dfee0c8b7f301e6a52047cc9864a.zip
csu: Update __libgcc_s_init comment
Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit 08c6e95234c60a5c2f37532d1111acf084f39345)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/gnu/unwind-resume.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d6686a9f5..82767ac063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-11 Florian Weimer <fweimer@redhat.com>
+
+ * sysdeps/gnu/unwind-resume.c (__libgcc_s_init): Update comment
+ and error message.
+
2018-01-16 Florian Weimer <fweimer@redhat.com>
* nptl/Makefile (CFLAGS-tst-minstack-throw.o): Compile in C++11
diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c
index 5d25e73dd1..e81b65692a 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);