summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2018-05-30 15:32:40 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-30 15:32:40 +0000
commitaa922bbaf38d896ecb46ae08c675c2ef0df811db (patch)
tree2f60eaa9345f752e896269a91fed215cab7d2e12 /linker/linker.cpp
parentd980cc0c51137c435c1a6bd4f802eff9b6b688c3 (diff)
parent55547db4345ee692b9cfe727c97dd860ed8263f8 (diff)
Merge "Add secondary counter in place of tls_nodelete flag"
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp8
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",