Linker was not unloading libraries marked with RTLD_NODELETE
even when there was a error on load. For example when one of
dt_needed libraries was not found.
Bug: http://b/
27911891
Change-Id: Ibc0bf110aa41fbfdc9f327ad8c364f2e3600af71
}
bool soinfo::can_unload() const {
- return (get_rtld_flags() & (RTLD_NODELETE | RTLD_GLOBAL)) == 0;
+ return !is_linked() || ((get_rtld_flags() & (RTLD_NODELETE | RTLD_GLOBAL)) == 0);
}
bool soinfo::is_linked() const {