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