[PATCH v3 00/37] libpthread removal: NPTL forwarders are gone
Florian Weimer
fweimer@redhat.com
Thu Mar 18 22:06:42 GMT 2021
I've pushed a rebase to fw/libpthread-20180318b. Apart from abilist
merges (automatically resolved) and various nptl/Versions and
nptl/Makefile conflicts (manually resolved), the main difference is
this:
diff --git a/nptl/pthread_exit.c b/nptl/pthread_exit.c
index 1a93f371a9..6abf66463e 100644
--- a/nptl/pthread_exit.c
+++ b/nptl/pthread_exit.c
@@ -25,16 +25,22 @@
void
__pthread_exit (void *value)
{
{
struct unwind_link *unwind_link = __libc_unwind_link_get ();
if (unwind_link == NULL)
__libc_fatal (LIBGCC_S_SO
" must be installed for pthread_exit to work\n");
}
THREAD_SETMEM (THREAD_SELF, result, value);
__do_cancel ();
}
libc_hidden_def (__pthread_exit)
weak_alias (__pthread_exit, pthread_exit)
+
+/* Ensure that the unwinder is always linked in (the __pthread_unwind
+ reference from __do_cancel is weak). Use ___pthread_unwind_next
+ (three underscores) to produce a strong reference to the same
+ file. */
+PTHREAD_STATIC_FN_REQUIRE (___pthread_unwind_next)
Without this, nptl/tst-pthread_exit-nothreads-static fails. After
Adhemerval's cleanups, we no longer link in the unwinder in that minimal
test program, so the call to __pthread_unwind turns into a call to a
null pointer.
Thanks,
Florian
More information about the Libc-alpha
mailing list