diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-02-13 12:22:06 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-02-13 12:22:06 +0100 |
commit | d1e3c170371fecb3e0c5615307de2a8f1ea52161 (patch) | |
tree | b64a1be88bdd6ff48b7264cdb3699e49cf7e5be3 /nptl | |
parent | 67398a546df6d1d00f2f725350c6c58e8b719174 (diff) | |
download | glibc-d1e3c170371fecb3e0c5615307de2a8f1ea52161.tar.gz |
nptl: Use <unwind-link.h> for accessing the libgcc_s unwinderfw/unwind-link
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 dda11e5922..644d196ab4 100644 --- a/nptl/nptlfreeres.c +++ b/nptl/nptlfreeres.c @@ -27,5 +27,4 @@ __libpthread_freeres (void) { call_function_static_weak (__nptl_stacks_freeres); call_function_static_weak (__shm_directory_freeres); - call_function_static_weak (__nptl_unwind_freeres); } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 7e0ab8ef42..2f370ae0ae 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -290,9 +290,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 8e7be996e9..42b58b7034 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; |