summaryrefslogtreecommitdiffstats
path: root/src/oat_file.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2012-02-01 15:02:31 -0800
committerBrian Carlstrom <bdc@google.com>2012-02-03 18:11:56 -0800
commit5b332c89fa3fdd7dc184b22c2587d28af304d019 (patch)
treef348c63b6756adad52d1e242786df1c9136d6eee /src/oat_file.h
parent9cb39392bacbd2a561c6bd840fff821ff7afaa7e (diff)
downloadart-5b332c89fa3fdd7dc184b22c2587d28af304d019.zip
art-5b332c89fa3fdd7dc184b22c2587d28af304d019.tar.gz
art-5b332c89fa3fdd7dc184b22c2587d28af304d019.tar.bz2
Fix checksum verification when opening DexFiles from OatFiles
Change-Id: Ic3d13f3d591c34f159bf0739536a1751c3e7dc75
Diffstat (limited to 'src/oat_file.h')
-rw-r--r--src/oat_file.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/oat_file.h b/src/oat_file.h
index 4740ae7..2895d74 100644
--- a/src/oat_file.h
+++ b/src/oat_file.h
@@ -39,6 +39,11 @@ class OatFile {
const std::string& strip_location_prefix,
byte* requested_base);
+ // Open an oat file from an already opened File with the given location.
+ static OatFile* Open(File& file,
+ const std::string& location,
+ byte* requested_base);
+
~OatFile();
const std::string& GetLocation() const {
@@ -166,8 +171,8 @@ class OatFile {
return dex_file_location_;
}
- uint32_t GetDexFileChecksum() const {
- return dex_file_checksum_;
+ uint32_t GetDexFileLocationChecksum() const {
+ return dex_file_location_checksum_;
}
~OatDexFile();
@@ -180,7 +185,7 @@ class OatFile {
const OatFile* oat_file_;
std::string dex_file_location_;
- uint32_t dex_file_checksum_;
+ uint32_t dex_file_location_checksum_;
const byte* dex_file_pointer_;
const uint32_t* oat_class_offsets_pointer_;
@@ -198,7 +203,7 @@ class OatFile {
private:
explicit OatFile(const std::string& filename);
- bool Read(const std::string& filename, byte* requested_base);
+ bool Read(File& file, byte* requested_base);
const byte* Begin() const;
const byte* End() const;