|
35 | 35 | * SUCH DAMAGE. |
36 | 36 | */ |
37 | 37 |
|
| 38 | +#include <cxxabi.h> |
38 | 39 | #include <dlfcn.h> |
39 | 40 | #include <elf.h> |
40 | 41 | #include <fcntl.h> |
@@ -244,9 +245,6 @@ struct EH_Frame_HDR { |
244 | 245 | // with the module_id and offset. |
245 | 246 | extern "C" void* __tls_get_addr(void*); |
246 | 247 |
|
247 | | -extern "C" int |
248 | | -__cxa_thread_atexit_impl(void (*dtor)(void*), void* obj, void* dso_symbol); |
249 | | - |
250 | 248 | // This object performs TLS emulation for modules not loaded by dlopen. |
251 | 249 | // Normally modules have a module_id that is used as a key in libc for the |
252 | 250 | // thread local data for that module. However, there is no public API for |
@@ -987,7 +985,7 @@ struct __attribute__((visibility("hidden"))) CustomLibraryImpl |
987 | 985 | return (Elf64_Addr)local__tls_get_addr; |
988 | 986 | } |
989 | 987 | if (strcmp(sym_name, "__cxa_thread_atexit") == 0) { |
990 | | - return (Elf64_Addr)__cxa_thread_atexit_impl; |
| 988 | + return (Elf64_Addr)__cxxabiv1::__cxa_thread_atexit; |
991 | 989 | } |
992 | 990 | } |
993 | 991 |
|
@@ -1242,7 +1240,7 @@ struct __attribute__((visibility("hidden"))) CustomLibraryImpl |
1242 | 1240 | void* start = pthread_getspecific(tls_key_); |
1243 | 1241 | if (!start) { |
1244 | 1242 | start = malloc(tls_mem_size_); |
1245 | | - __cxa_thread_atexit_impl(free, start, &__dso_handle); |
| 1243 | + __cxxabiv1::__cxa_thread_atexit(free, start, &__dso_handle); |
1246 | 1244 | memcpy(start, tls_initalization_image_, tls_file_size_); |
1247 | 1245 | memset( |
1248 | 1246 | (void*)((const char*)start + tls_file_size_), |
|
0 commit comments