summaryrefslogtreecommitdiffstats
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-07-12 20:22:23 -0700
committerBrian Carlstrom <bdc@google.com>2013-07-12 20:45:54 -0700
commitf1d3455064792ac1c486a4a9c24279a37b4af473 (patch)
treeac3020b447d6929def1f3322b5165bef6a66a4cd /runtime/class_linker.cc
parent7940e44f4517de5e2634a7e07d58d0fb26160513 (diff)
downloadart-f1d3455064792ac1c486a4a9c24279a37b4af473.zip
art-f1d3455064792ac1c486a4a9c24279a37b4af473.tar.gz
art-f1d3455064792ac1c486a4a9c24279a37b4af473.tar.bz2
Do not mark pages executable unnecessarily to play nice with selinux
Change-Id: Ief4a5da38ac7c2cf7bf6f7a640cb63c5e8ed03bd
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 8ea4295..e35b95c 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -692,7 +692,8 @@ OatFile* ClassLinker::OpenOat(const gc::space::ImageSpace* space) {
oat_filename += runtime->GetHostPrefix();
oat_filename += oat_location->ToModifiedUtf8();
runtime->GetHeap()->UnReserveOatFileAddressRange();
- OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin());
+ OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(),
+ !Runtime::Current()->IsCompiler());
VLOG(startup) << "ClassLinker::OpenOat entering oat_filename=" << oat_filename;
if (oat_file == NULL) {
LOG(ERROR) << "Failed to open oat file " << oat_filename << " referenced from image.";
@@ -731,7 +732,8 @@ const OatFile* ClassLinker::FindOpenedOatFileFromDexLocation(const std::string&
const DexFile* ClassLinker::FindDexFileInOatLocation(const std::string& dex_location,
uint32_t dex_location_checksum,
const std::string& oat_location) {
- UniquePtr<OatFile> oat_file(OatFile::Open(oat_location, oat_location, NULL));
+ UniquePtr<OatFile> oat_file(OatFile::Open(oat_location, oat_location, NULL,
+ !Runtime::Current()->IsCompiler()));
if (oat_file.get() == NULL) {
return NULL;
}
@@ -787,7 +789,8 @@ const DexFile* ClassLinker::FindOrCreateOatFileForDexLocationLocked(const std::s
LOG(ERROR) << "Failed to generate oat file: " << oat_location;
return NULL;
}
- const OatFile* oat_file = OatFile::Open(oat_location, oat_location, NULL);
+ const OatFile* oat_file = OatFile::Open(oat_location, oat_location, NULL,
+ !Runtime::Current()->IsCompiler());
if (oat_file == NULL) {
LOG(ERROR) << "Failed to open generated oat file: " << oat_location;
return NULL;
@@ -936,7 +939,7 @@ const OatFile* ClassLinker::FindOatFileFromOatLocationLocked(const std::string&
return oat_file;
}
- oat_file = OatFile::Open(oat_location, oat_location, NULL);
+ oat_file = OatFile::Open(oat_location, oat_location, NULL, !Runtime::Current()->IsCompiler());
if (oat_file == NULL) {
return NULL;
}