diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-03-01 15:56:36 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-03-01 16:00:22 +0100 |
commit | 97e42bd482b62d7b74889be11c98b0bbb4059dcd (patch) | |
tree | 374b3d1c4ab7dc13601bf1af77463aeefd5b73b9 /nptl | |
parent | 6b7efa3d8703cfd020281706f8110bc4a41b1525 (diff) | |
download | glibc-97e42bd482b62d7b74889be11c98b0bbb4059dcd.tar glibc-97e42bd482b62d7b74889be11c98b0bbb4059dcd.tar.gz glibc-97e42bd482b62d7b74889be11c98b0bbb4059dcd.tar.bz2 glibc-97e42bd482b62d7b74889be11c98b0bbb4059dcd.zip |
nptl: Use <unwind-link.h> for accessing the libgcc_s unwinder
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/nptlfreeres.c | 1 | ||||
-rw-r--r-- | nptl/pthreadP.h | 6 | ||||
-rw-r--r-- | nptl/pthread_cancel.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/nptl/nptlfreeres.c b/nptl/nptlfreeres.c index d295bcb3c3..4833f04714 100644 --- a/nptl/nptlfreeres.c +++ b/nptl/nptlfreeres.c @@ -27,5 +27,4 @@ __libpthread_freeres (void) { call_function_static_weak (__default_pthread_attr_freeres); call_function_static_weak (__nptl_stacks_freeres); - call_function_static_weak (__nptl_unwind_freeres); } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index d078128230..d2fd0826fe 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -287,9 +287,11 @@ hidden_proto (__pthread_unwind_next) hidden_proto (__pthread_register_cancel) hidden_proto (__pthread_unregister_cancel) # ifdef SHARED -extern void attribute_hidden pthread_cancel_init (void); +/* The difference from __libc_unwind_link_get is that here, errors + terminate the process. */ +struct unwind_link ; +struct unwind_link *__pthread_unwind_link_get (void) attribute_hidden; # endif -extern void __nptl_unwind_freeres (void) attribute_hidden; #endif diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index f88fa24e19..a011d72fa1 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -35,7 +35,8 @@ __pthread_cancel (pthread_t th) return ESRCH; #ifdef SHARED - pthread_cancel_init (); + /* Trigger an error if libgcc_s cannot be loaded. */ + __pthread_unwind_link_get (); #endif int result = 0; int oldval; |