summaryrefslogtreecommitdiff
path: root/linker/linker_soinfo.cpp
diff options
context:
space:
mode:
authorSteven Laver <lavers@google.com>2019-08-07 15:49:43 -0700
committerSteven Laver <lavers@google.com>2019-08-07 15:49:43 -0700
commitbfda022dd6fbbcea60e9f52496d90ece514b32da (patch)
tree97c69d2bdd0e0ff59d55a0d2a8596ed678cded3e /linker/linker_soinfo.cpp
parent70ebd716b3e81d304cda14d2bd77996cc2840962 (diff)
parent848e1d8a30a3465040edc27085927309fe6cbcff (diff)
Merge RP1A.190528.001
Change-Id: If6e905407e26a19e0266185af46b4ff461c4d45e
Diffstat (limited to 'linker/linker_soinfo.cpp')
-rw-r--r--linker/linker_soinfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/linker/linker_soinfo.cpp b/linker/linker_soinfo.cpp
index 31ee74c86..5f40528e9 100644
--- a/linker/linker_soinfo.cpp
+++ b/linker/linker_soinfo.cpp
@@ -391,13 +391,15 @@ static void call_array(const char* array_name __unused,
}
void soinfo::call_pre_init_constructors() {
+ if (g_is_ldd) return;
+
// DT_PREINIT_ARRAY functions are called before any other constructors for executables,
// but ignored in a shared library.
call_array("DT_PREINIT_ARRAY", preinit_array_, preinit_array_count_, false, get_realpath());
}
void soinfo::call_constructors() {
- if (constructors_called) {
+ if (constructors_called || g_is_ldd) {
return;
}