summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
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",