summaryrefslogtreecommitdiffstats
path: root/runtime/oat_file.h
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2014-08-14 14:16:26 -0700
committerAlex Light <allight@google.com>2014-08-19 14:07:49 -0700
commit9dcc4572949f6a8231a1b4ed859676ba6f411726 (patch)
tree127ad110c7bd5fa865de2dd64e8658e73d95ddc0 /runtime/oat_file.h
parent57101be6db093d9d27776f77eb8880ae5bae9913 (diff)
downloadart-9dcc4572949f6a8231a1b4ed859676ba6f411726.tar.gz
art-9dcc4572949f6a8231a1b4ed859676ba6f411726.tar.bz2
art-9dcc4572949f6a8231a1b4ed859676ba6f411726.zip
Make apps able to run with a failing patchoat
Bug: 17000769 Change-Id: I0a1a4dc7f5d4bb268530840302ecfb1555231e05
Diffstat (limited to 'runtime/oat_file.h')
-rw-r--r--runtime/oat_file.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index 508bfc229e..8535bf4133 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -64,6 +64,10 @@ class OatFile {
~OatFile();
+ bool IsExecutable() const {
+ return is_executable_;
+ }
+
ElfFile* GetElfFile() const {
CHECK_NE(reinterpret_cast<uintptr_t>(elf_file_.get()), reinterpret_cast<uintptr_t>(nullptr))
<< "Cannot get an elf file from " << GetLocation();
@@ -270,7 +274,7 @@ class OatFile {
bool executable,
std::string* error_msg);
- explicit OatFile(const std::string& filename);
+ explicit OatFile(const std::string& filename, bool executable);
bool Dlopen(const std::string& elf_filename, byte* requested_base, std::string* error_msg);
bool ElfFileOpen(File* file, byte* requested_base, bool writable, bool executable,
std::string* error_msg);
@@ -287,6 +291,9 @@ class OatFile {
// Pointer to end of oat region for bounds checking.
const byte* end_;
+ // Was this oat_file loaded executable?
+ const bool is_executable_;
+
// Backing memory map for oat file during when opened by ElfWriter during initial compilation.
std::unique_ptr<MemMap> mem_map_;