Do not add arcs to the soinfo graph on dlopen
While introducing RTLD_NOLOAD in b648a8a5 a change in how soinfo structs are
connected was also introduced. When calling dlopen the library that is loaded
is added as a child to the soinfo from which the caller comes - i.e. building a
dependency graph.
Unfortunately this shows issues upon unloading, such as blowing the stack if
there are loops in the graph.
This change reverts that part of b648a8a5, keeping everything as a child of the
root soinfo.
Change-Id: I604ee9210613b19f693a568158e69707620a95db
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 9f458b4..151d4ce 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -841,9 +841,6 @@
soinfo* si = find_library(name, flags, extinfo);
if (si != NULL) {
si->CallConstructors();
- if (caller != NULL) {
- caller->add_child(si);
- }
}
protect_data(PROT_READ);
return si;