Add a way to track all dlsym calls (contd.)
The followup for 4742abdcb52f16120016a5005c466230d4c46341
Changes in this file got lost in the process of cherry-picking
the change across repositories.
Bug: http://b/29458203
Test: flash, set debug.ld.all to dlsym and check
if there are messages in logcat
Change-Id: I4613908e46e75c5d9ec66396767f10fc6d3e9777
diff --git a/linker/linker_logger.cpp b/linker/linker_logger.cpp
index a9d358a..8190cc9 100644
--- a/linker/linker_logger.cpp
+++ b/linker/linker_logger.cpp
@@ -45,6 +45,7 @@
static const char* kOptionErrors = "dlerror";
static const char* kOptionDlopen = "dlopen";
+static const char* kOptionDlsym = "dlsym";
static std::string property_get(const char* name) {
char value[PROP_VALUE_MAX] = {};
@@ -66,6 +67,8 @@
flags |= kLogErrors;
} else if (o == kOptionDlopen){
flags |= kLogDlopen;
+ } else if (o == kOptionDlsym){
+ flags |= kLogDlsym;
} else {
__libc_format_log(ANDROID_LOG_WARN, "linker", "Unknown debug.ld option \"%s\", will ignore.", o.c_str());
}