summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2015-10-13 11:07:56 -0700
committerDmitriy Ivanov <dimitry@google.com>2015-10-13 15:48:57 -0700
commitfae39d2bf9fb6f08da4a095f5fe3ff093bcdbee8 (patch)
treea6da7d5b607717a6e917cf6f8c2cdf1a8ec0af00 /linker/linker.cpp
parent30cd7065b6cd37342e23904cb512c409b8bbd4f1 (diff)
Log dlopen failures caused by text relocations
Some apps will fail to load native libraries with text relocations when switching target sdk version to M. It could be hard to diagnose because some of them suppress dlerror and/or UnsatisfiedLinkError. This change unconditionally logs the error message making the cause of the failure more visible to developers. Bug: http://b/24876001 Change-Id: I0477a0d1307d0879000f3a3a43b974b4cf34bdb2 (cherry picked from commit f32b689d3dbe7a1317bce58d1d9bef9bba173c66)
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 4e899c312..406cdee1a 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3108,6 +3108,7 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t&
if (has_text_relocations) {
// Fail if app is targeting sdk version > 22
if (get_application_target_sdk_version() > 22) {
+ PRINT("%s: has text relocations", get_realpath());
DL_ERR("%s: has text relocations", get_realpath());
return false;
}