summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2016-11-21 10:44:35 -0800
committerDimitry Ivanov <dimitry@google.com>2016-11-21 12:32:08 -0800
commitae4a0c186fb12129d9c677e71258f3cfce8abc07 (patch)
treea0a1792effaeb7531c5724896eb441c63494ce99 /linker/linker.cpp
parent5fabe027571627bf72eec1e23bfbb3a69845480a (diff)
Log call to elf-constructors
Log call to constructors when dlopen logging is enabled. Bug: http://b/29458203 Test: bionic-unit-tests --gtest_filter=dl*:Dl* Change-Id: I0cd591bf147f8f910ae9def1ac4089ef44099aff
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 266ca6e81..62e6bb6d7 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1804,10 +1804,13 @@ void* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo,
ProtectedDataGuard guard;
soinfo* si = find_library(ns, translated_name, flags, extinfo, caller);
if (si != nullptr) {
- failure_guard.disable();
- si->call_constructors();
void* handle = si->to_handle();
LD_LOG(kLogDlopen,
+ "... dlopen calling constructors: realpath=\"%s\", soname=\"%s\", handle=%p",
+ si->get_realpath(), si->get_soname(), handle);
+ si->call_constructors();
+ failure_guard.disable();
+ LD_LOG(kLogDlopen,
"... dlopen successful: realpath=\"%s\", soname=\"%s\", handle=%p",
si->get_realpath(), si->get_soname(), handle);
return handle;