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>
This commit is contained in:
Bjorn Andersson 2014-05-22 17:53:01 -07:00 committed by Dmitriy Ivanov
parent 0b10ffb40f
commit 3c005d6019

View File

@ -841,9 +841,6 @@ soinfo* do_dlopen(const char* name, int flags, soinfo* caller, const android_dle
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;