diff options
author | Dimitry Ivanov <dimitry@google.com> | 2018-05-30 15:32:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-30 15:32:40 +0000 |
commit | aa922bbaf38d896ecb46ae08c675c2ef0df811db (patch) | |
tree | 2f60eaa9345f752e896269a91fed215cab7d2e12 /linker/linker.cpp | |
parent | d980cc0c51137c435c1a6bd4f802eff9b6b688c3 (diff) | |
parent | 55547db4345ee692b9cfe727c97dd860ed8263f8 (diff) |
Merge "Add secondary counter in place of tls_nodelete flag"
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 7e72b27b3..9503a4981 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -1936,7 +1936,7 @@ void increment_dso_handle_reference_counter(void* dso_handle) { soinfo* si = find_containing_library(dso_handle); if (si != nullptr) { ProtectedDataGuard guard; - si->set_tls_nodelete(); + si->increment_ref_count(); } else { async_safe_fatal( "increment_dso_handle_reference_counter: Couldn't find soinfo by dso_handle=%p", @@ -1959,11 +1959,7 @@ void decrement_dso_handle_reference_counter(void* dso_handle) { soinfo* si = find_containing_library(dso_handle); if (si != nullptr) { ProtectedDataGuard guard; - si->unset_tls_nodelete(); - if (si->get_ref_count() == 0) { - // Perform deferred unload - note that soinfo_unload_impl does not decrement ref_count - soinfo_unload_impl(si); - } + soinfo_unload(si); } else { async_safe_fatal( "decrement_dso_handle_reference_counter: Couldn't find soinfo by dso_handle=%p", |