summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorDmitriy Ivanov <dimitry@google.com>2014-09-09 10:21:42 -0700
committerDmitriy Ivanov <dimitry@google.com>2014-10-01 16:04:58 -0700
commit7d971ec14b80cac442aeea8d88e9eb2e3ab6f214 (patch)
treea6c49cf522ec4cb5bc43edfbed24fa1dc209ef6b /linker
parentf4cb6313645ef65cc0eea0a439e51b6788cd3439 (diff)
downloadbionic-7d971ec14b80cac442aeea8d88e9eb2e3ab6f214.zip
bionic-7d971ec14b80cac442aeea8d88e9eb2e3ab6f214.tar.gz
bionic-7d971ec14b80cac442aeea8d88e9eb2e3ab6f214.tar.bz2
Fix unload of recursively linked library
Expanded test for recursive libs. Fixed bug with unnecessary soinfo_free of already loaded library. (cherry picked from commit a6ac54a215d6b64f5cc5a59b66c1dbfbb41ea9f5) Change-Id: I6907c723d9fbdf6b2777f3f236b1e29b0843edd6
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 1b4fb62..acbb1b0 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -843,6 +843,7 @@ static soinfo* load_library(LoadTaskList& load_tasks, const char* name, int dlfl
}
if ((dlflags & RTLD_NOLOAD) != 0) {
+ DL_ERR("library \"%s\" wasn't loaded and RTLD_NOLOAD prevented it", name);
return nullptr;
}
@@ -950,7 +951,6 @@ static bool find_libraries(const char* const library_names[], size_t library_nam
soinfo* needed_by = task->get_needed_by();
if (is_recursive(si, needed_by)) {
- soinfo_free(si);
return false;
}