diff options
author | 2014-07-18 14:57:04 -0700 | |
---|---|---|
committer | 2014-08-05 10:22:08 -0700 | |
commit | 6e183f2e973a20f2eaca135c240908e1bf98c5d0 (patch) | |
tree | 8a989eb8dbaca6a2c505569784740f9581fe7e98 /runtime/class_linker.h | |
parent | eb76e11d836ea953b4e40a28e3e69d3b0f4c86fa (diff) |
Make system use patchoat to relocate during runtime.
Change dalvik_system_DexFile.cc so that isDexOptNeededInternal will be
able to indicate that a patchoat is required. Change default of relocate
option to be on.
Bug: 15358152
Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 1bb1635b28..8c0904203b 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -274,12 +274,18 @@ class ClassLinker { std::vector<const DexFile*>* dex_files) LOCKS_EXCLUDED(dex_lock_, Locks::mutator_lock_); + // Returns true if the given oat file has the same image checksum as the image it is paired with. + static bool VerifyOatImageChecksum(const OatFile* oat_file, const InstructionSet instruction_set); + // Returns true if the oat file checksums match with the image and the offsets are such that it + // could be loaded with it. + static bool VerifyOatChecksums(const OatFile* oat_file, const InstructionSet instruction_set, + std::string* error_msg); // Returns true if oat file contains the dex file with the given location and checksum. - static bool VerifyOatFileChecksums(const OatFile* oat_file, - const char* dex_location, - uint32_t dex_location_checksum, - InstructionSet instruction_set, - std::string* error_msg); + static bool VerifyOatAndDexFileChecksums(const OatFile* oat_file, + const char* dex_location, + uint32_t dex_location_checksum, + InstructionSet instruction_set, + std::string* error_msg); // TODO: replace this with multiple methods that allocate the correct managed type. template <class T> |