diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:50 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:50 +0200 |
commit | 1d95b035c721908d3bcbbca9e8d3a5e55a24c09e (patch) | |
tree | acc915c7a01fc6ad5572767b483cf6cfc9c9118b /nptl/pthread_exit.c | |
parent | 3fec7f18bfcb7044e813a12e19c3c98eb8387e26 (diff) | |
download | glibc-1d95b035c721908d3bcbbca9e8d3a5e55a24c09e.tar.gz |
nptl: Move __pthread_unwind_next into libc
It's necessary to stub out __libc_disable_asynccancel and
__libc_enable_asynccancel via rtld-stubbed-symbols because the new
direct references to the unwinder result in symbol conflicts when the
rtld exception handling from libc is linked in during the construction
of librtld.map.
unwind-forcedunwind.c is merged into unwind-resume.c. libc now needs
the functions that were previously only used in libpthread.
The GLIBC_PRIVATE exports of __libc_longjmp and __libc_siglongjmp are
no longer needed, so switch them to hidden symbols.
The symbol __pthread_unwind_next has been moved using
scripts/move-symbol-to-libc.py.
Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_exit.c')
-rw-r--r-- | nptl/pthread_exit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nptl/pthread_exit.c b/nptl/pthread_exit.c index 4afc406268..aed8c12e17 100644 --- a/nptl/pthread_exit.c +++ b/nptl/pthread_exit.c @@ -18,11 +18,20 @@ #include <stdlib.h> #include "pthreadP.h" - +#include <unwind-link.h> +#include <stdio.h> +#include <gnu/lib-names.h> 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 (); |