Merge "Remove workaround for libart greylist." into nyc-dev
am: 595efd0
* commit '595efd04db3970180d2a2de97524ac5e9a421a25':
Remove workaround for libart greylist.
Change-Id: Ia42dfbad1f4c39592b8534eb16fbfe77444a46b7
This commit is contained in:
commit
9c69970a9b
1 changed files with 1 additions and 16 deletions
|
|
@ -40,10 +40,6 @@ namespace android {
|
||||||
static constexpr const char* kPublicNativeLibrariesSystemConfig = "/system/etc/public.libraries.txt";
|
static constexpr const char* kPublicNativeLibrariesSystemConfig = "/system/etc/public.libraries.txt";
|
||||||
static constexpr const char* kPublicNativeLibrariesVendorConfig = "/vendor/etc/public.libraries.txt";
|
static constexpr const char* kPublicNativeLibrariesVendorConfig = "/vendor/etc/public.libraries.txt";
|
||||||
|
|
||||||
static bool namespace_workaround_enabled(int32_t target_sdk_version) {
|
|
||||||
return target_sdk_version <= 23;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LibraryNamespaces {
|
class LibraryNamespaces {
|
||||||
public:
|
public:
|
||||||
LibraryNamespaces() : initialized_(false) { }
|
LibraryNamespaces() : initialized_(false) { }
|
||||||
|
|
@ -156,18 +152,7 @@ class LibraryNamespaces {
|
||||||
bool InitPublicNamespace(const char* library_path, int32_t target_sdk_version) {
|
bool InitPublicNamespace(const char* library_path, int32_t target_sdk_version) {
|
||||||
std::string publicNativeLibraries = public_libraries_;
|
std::string publicNativeLibraries = public_libraries_;
|
||||||
|
|
||||||
// TODO (dimitry): This is a workaround for http://b/26436837
|
UNUSED(target_sdk_version);
|
||||||
// will be removed before the release.
|
|
||||||
if (namespace_workaround_enabled(target_sdk_version)) {
|
|
||||||
// check if libart.so is loaded.
|
|
||||||
void* handle = dlopen("libart.so", RTLD_NOW | RTLD_NOLOAD);
|
|
||||||
if (handle != nullptr) {
|
|
||||||
publicNativeLibraries += ":libart.so";
|
|
||||||
dlclose(handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// END OF WORKAROUND
|
|
||||||
|
|
||||||
// (http://b/25844435) - Some apps call dlopen from generated code (mono jited
|
// (http://b/25844435) - Some apps call dlopen from generated code (mono jited
|
||||||
// code is one example) unknown to linker in which case linker uses anonymous
|
// code is one example) unknown to linker in which case linker uses anonymous
|
||||||
// namespace. The second argument specifies the search path for the anonymous
|
// namespace. The second argument specifies the search path for the anonymous
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue