Searched refs:oat_file (Results 1 - 20 of 20) sorted by relevance

/art/test/117-nopatchoat/
H A Dnopatchoat.cc51 const OatFile* oat_file = oat_dex_file->GetOatFile(); local
52 return oat_file->IsPic();
/art/compiler/
H A Delf_patcher.h26 #include "oat_file.h"
43 const OatFile* oat_file, uintptr_t oat_data_begin,
57 const OatFile* oat_file, uintptr_t oat_data_begin,
60 return ElfPatcher::Patch(driver, elf_file, oat_file, oat_data_begin,
65 ElfPatcher(const CompilerDriver* driver, ElfFile* elf_file, const OatFile* oat_file, argument
68 : compiler_driver_(driver), elf_file_(elf_file), oat_file_(oat_file),
112 // The oat_file that is actually loaded.
H A Delf_patcher.cc44 const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); local
45 if (oat_file == nullptr) {
47 oat_file = OatFile::Open(oat_location, oat_location, nullptr, nullptr, false, error_msg);
48 if (oat_file == nullptr) {
53 CHECK_EQ(class_linker->RegisterOatFile(oat_file), oat_file);
55 return ElfPatcher::Patch(driver, elf_file, oat_file,
56 reinterpret_cast<uintptr_t>(oat_file->Begin()), cb, cb_data, error_msg);
59 bool ElfPatcher::Patch(const CompilerDriver* driver, ElfFile* elf, const OatFile* oat_file, argument
73 ElfPatcher p(driver, elf, oat_file, oat_heade
[all...]
H A Dimage_test.cc62 ScratchFile oat_file(OS::CreateEmptyFile(oat_filename.c_str()));
89 oat_file.GetFile());
93 // Workound bug that mcld::Linker::emit closes oat_file by reopening as dup_oat.
94 std::unique_ptr<File> dup_oat(OS::OpenFileReadWrite(oat_file.GetFilename().c_str()));
107 << oat_file.GetFilename();
191 oat_file.Unlink();
H A Doat_test.cc27 #include "oat_file-inl.h"
138 std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp.GetFilename(), tmp.GetFilename(), nullptr,
140 ASSERT_TRUE(oat_file.get() != nullptr) << error_msg;
141 const OatHeader& oat_header = oat_file->GetOatHeader();
150 const OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(dex_file->GetLocation().c_str(),
H A Delf_writer_mclinker.cc162 std::unique_ptr<OatFile> oat_file(OatFile::OpenMemory(oat_contents, elf_file_->GetPath(), &error_msg));
163 CHECK(oat_file.get() != NULL) << elf_file_->GetPath() << ": " << error_msg;
165 const char* oat_data_start = reinterpret_cast<const char*>(&oat_file->GetOatHeader());
166 const size_t oat_data_length = oat_file->GetOatHeader().GetExecutableOffset();
168 const size_t oat_code_length = oat_file->Size() - oat_data_length;
208 oat_file->Size());
H A Dimage_writer.cc54 #include "oat_file.h"
89 std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename.c_str()));
90 if (oat_file.get() == NULL) {
95 oat_file_ = OatFile::OpenReadable(oat_file.get(), oat_location, &error_msg);
147 ElfWriter::GetOatElfInformation(oat_file.get(), oat_loaded_size, oat_data_offset);
151 PatchOatCodeAndMethods(oat_file.get());
156 if (oat_file->FlushCloseOrErase() != 0) {
/art/runtime/
H A Doat_file.cc17 #include "oat_file.h"
48 std::unique_ptr<OatFile> oat_file(new OatFile(location, false));
49 oat_file->elf_file_.reset(elf_file);
51 oat_file->begin_ = elf_file->Begin() + hdr->sh_offset;
52 oat_file->end_ = elf_file->Begin() + hdr->sh_size + hdr->sh_offset;
53 return oat_file->Setup(error_msg) ? oat_file.release() : nullptr;
61 std::unique_ptr<OatFile> oat_file(new OatFile(location, false));
62 oat_file->begin_ = &oat_contents[0];
63 oat_file
440 OatDexFile(const OatFile* oat_file, const std::string& dex_file_location, const std::string& canonical_dex_file_location, uint32_t dex_file_location_checksum, const byte* dex_file_pointer, const uint32_t* oat_class_offsets_pointer) argument
509 OatClass(const OatFile* oat_file, mirror::Class::Status status, OatClassType type, uint32_t bitmap_size, const uint32_t* bitmap_pointer, const OatMethodOffsets* methods_pointer) argument
[all...]
H A Dclass_linker.cc49 #include "oat_file.h"
676 const OatFile* ClassLinker::RegisterOatFile(const OatFile* oat_file) { argument
680 CHECK_NE(oat_file, oat_files_[i]) << oat_file->GetLocation();
683 VLOG(class_linker) << "Registering " << oat_file->GetLocation();
684 oat_files_.push_back(oat_file);
685 return oat_file;
690 OatFile* oat_file = space->ReleaseOatFile(); local
691 CHECK_EQ(RegisterOatFile(oat_file), oat_file); local
735 LoadMultiDexFilesFromOatFile(const OatFile* oat_file, const char* dex_location, const uint32_t* dex_location_checksum, bool generated, std::vector<std::string>* error_msgs, std::vector<const DexFile*>* dex_files) argument
909 const OatFile* oat_file = open_oat_file.release(); // Avoid deleting it. local
1068 VerifyOatImageChecksum(const OatFile* oat_file, const InstructionSet instruction_set) argument
1087 VerifyOatChecksums(const OatFile* oat_file, const InstructionSet instruction_set, std::string* error_msg) argument
1134 VerifyOatAndDexFileChecksums(const OatFile* oat_file, const char* dex_location, uint32_t dex_location_checksum, const InstructionSet instruction_set, std::string* error_msg) argument
1167 VerifyOatWithDexFile(const OatFile* oat_file, const char* dex_location, const uint32_t* dex_location_checksum, std::string* error_msg) argument
1238 const OatFile* oat_file = oat_files_[i]; local
1501 CheckOatFile(const Runtime* runtime, const OatFile* oat_file, InstructionSet isa, bool* checksum_verified, std::string* error_msg) argument
1568 const OatFile* oat_file = FindOpenedOatFileFromOatLocation(oat_location); local
1607 OatFile& oat_file = GetImageOatFile(space); local
6016 const OatFile* oat_file = oat_dex_file->GetOatFile(); local
[all...]
H A Doat_file.h202 OatClass(const OatFile* oat_file,
258 OatDexFile(const OatFile* oat_file,
327 // Was this oat_file loaded executable?
H A Dclass_linker.h32 #include "oat_file.h"
240 const OatFile* RegisterOatFile(const OatFile* oat_file)
289 static bool VerifyOatImageChecksum(const OatFile* oat_file, const InstructionSet instruction_set);
292 static bool VerifyOatChecksums(const OatFile* oat_file, const InstructionSet instruction_set,
295 static bool VerifyOatAndDexFileChecksums(const OatFile* oat_file,
616 bool CheckOatFile(const Runtime* runtime, const OatFile* oat_file, InstructionSet isa,
655 bool VerifyOatWithDexFile(const OatFile* oat_file, const char* dex_location,
H A Ddex_file.h394 const OatFile* oat_file,
396 return OpenMemory(base, size, location, location_checksum, NULL, oat_file, error_msg);
933 const OatFile* oat_file,
940 const OatFile* oat_file);
391 Open(const uint8_t* base, size_t size, const std::string& location, uint32_t location_checksum, const OatFile* oat_file, std::string* error_msg) argument
H A Ddex_file.cc331 const OatFile* oat_file,
335 new DexFile(base, size, location, location_checksum, mem_map, oat_file));
347 const OatFile* oat_file)
363 oat_file_(oat_file) {
326 OpenMemory(const byte* base, size_t size, const std::string& location, uint32_t location_checksum, MemMap* mem_map, const OatFile* oat_file, std::string* error_msg) argument
343 DexFile(const byte* base, size_t size, const std::string& location, uint32_t location_checksum, MemMap* mem_map, const OatFile* oat_file) argument
H A Druntime.cc69 #include "oat_file.h"
621 std::unique_ptr<OatFile> oat_file(OatFile::OpenWithElfFile(elf_file.release(), oat_location,
623 if (oat_file.get() == nullptr) {
628 for (const OatFile::OatDexFile* oat_dex_file : oat_file->GetOatDexFiles()) {
640 Runtime::Current()->GetClassLinker()->RegisterOatFile(oat_file.release());
H A DAndroid.mk133 oat_file.cc \
/art/dex2oat/
H A Ddex2oat.cc337 bool PatchOatCode(const CompilerDriver* compiler_driver, File* oat_file, argument
341 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(oat_file, PROT_READ|PROT_WRITE,
357 File* oat_file,
437 if (!driver->WriteElf(android_root, is_host, dex_files, &oat_writer, oat_file)) {
438 LOG(ERROR) << "Failed to write ELF file " << oat_file->GetPath();
439 oat_file->Erase();
446 if (oat_file->Flush() != 0) {
447 PLOG(ERROR) << "Failed flushing oat file " << oat_file->GetPath();
448 oat_file->Erase();
455 if (!PatchOatCode(driver.get(), oat_file, oat_locatio
353 CreateOatFile(const std::string& boot_image_option, const std::string& android_root, bool is_host, const std::vector<const DexFile*>& dex_files, File* oat_file, const std::string& oat_location, const std::string& bitcode_filename, bool image, std::unique_ptr<std::set<std::string>>& image_classes, std::unique_ptr<std::set<std::string>>& compiled_classes, bool dump_stats, bool dump_passes, TimingLogger& timings, CumulativeLogger& compiler_phases_timings, int swap_fd, std::string profile_file, SafeMap<std::string, std::string>* key_value_store) argument
1285 std::unique_ptr<File> oat_file; local
[all...]
/art/patchoat/
H A Dpatchoat.h62 PatchOat(ElfFile* oat_file, off_t delta, TimingLogger* timings) argument
63 : oat_file_(oat_file), delta_(delta), isa_(kNone), timings_(timings) {}
68 PatchOat(InstructionSet isa, ElfFile* oat_file, MemMap* image, argument
71 : oat_file_(oat_file), image_(image), bitmap_(bitmap), heap_(heap),
108 // Patches oat in place, modifying the oat_file given to the constructor.
/art/runtime/native/
H A Ddalvik_system_DexFile.cc293 std::unique_ptr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, nullptr,
296 if (oat_file.get() == nullptr) {
310 *oat_is_pic = oat_file->IsPic();
314 const art::OatFile::OatDexFile* oat_dex_file = oat_file->GetOatDexFile(filename, nullptr,
324 if (ClassLinker::VerifyOatChecksums(oat_file.get(), target_instruction_set, &error_msg)) {
331 ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) {
346 if (ClassLinker::VerifyOatAndDexFileChecksums(oat_file.get(), filename, location_checksum,
355 && ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) {
/art/oatdump/
H A Doatdump.cc48 #include "oat_file-inl.h"
142 explicit OatDumper(const OatFile& oat_file, OatDumperOptions* options) argument
143 : oat_file_(oat_file),
144 oat_dex_files_(oat_file.GetOatDexFiles()),
149 oat_file.Begin()))) {
1044 const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); local
1045 if (oat_file == nullptr) {
1046 oat_file = OatFile::Open(oat_location, oat_location, nullptr, nullptr, false, &error_msg);
1047 if (oat_file == nullptr) {
1054 stats_.oat_file_bytes = oat_file
1778 OatFile* oat_file = local
[all...]
/art/runtime/gc/space/
H A Dimage_space.cc32 #include "oat_file.h"
744 OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, image_header.GetOatDataBegin(), local
747 if (oat_file == NULL) {
752 uint32_t oat_checksum = oat_file->GetOatHeader().GetChecksum();
760 int32_t oat_patch_delta = oat_file->GetOatHeader().GetImagePatchDelta();
768 return oat_file;

Completed in 1178 milliseconds