/art/compiler/ |
D | elf_fixup.cc | 33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, &error_msg)); in Fixup() local 34 CHECK(elf_file.get() != nullptr) << error_msg; in Fixup() 37 Elf32_Addr oatdata_address = ElfWriter::GetOatDataAddress(elf_file.get()); in Fixup() 40 if (!FixupDynamic(*elf_file.get(), base_address)) { in Fixup() 44 if (!FixupSectionHeaders(*elf_file.get(), base_address)) { in Fixup() 48 if (!FixupProgramHeaders(*elf_file.get(), base_address)) { in Fixup() 52 if (!FixupSymbols(*elf_file.get(), base_address, true)) { in Fixup() 56 if (!FixupSymbols(*elf_file.get(), base_address, false)) { in Fixup() 60 if (!FixupRelocations(*elf_file.get(), base_address)) { in Fixup() 68 bool ElfFixup::FixupDynamic(ElfFile& elf_file, uintptr_t base_address) { in FixupDynamic() argument [all …]
|
D | elf_stripper.cc | 33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, error_msg)); in Strip() local 34 if (elf_file.get() == nullptr) { in Strip() 72 section_headers.reserve(elf_file->GetSectionHeaderNum()); in Strip() 75 Elf32_Shdr* string_section = elf_file->GetSectionNameStringSection(); in Strip() 77 for (Elf32_Word i = 0; i < elf_file->GetSectionHeaderNum(); i++) { in Strip() 78 Elf32_Shdr* sh = elf_file->GetSectionHeader(i); in Strip() 80 const char* name = elf_file->GetString(*string_section, sh->sh_name); in Strip() 99 CHECK(elf_file->GetSectionHeader(1) != nullptr); in Strip() 100 Elf32_Off offset = elf_file->GetSectionHeader(1)->sh_offset; in Strip() 103 Elf32_Shdr* old_sh = elf_file->GetSectionHeader(section_headers_original_indexes[i]); in Strip() [all …]
|
D | elf_writer.cc | 33 uint32_t ElfWriter::GetOatDataAddress(ElfFile* elf_file) { in GetOatDataAddress() argument 34 Elf32_Addr oatdata_address = elf_file->FindSymbolAddress(SHT_DYNSYM, in GetOatDataAddress() 45 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, false, false, &error_msg)); in GetOatElfInformation() local 46 CHECK(elf_file.get() != nullptr) << error_msg; in GetOatElfInformation() 48 oat_loaded_size = elf_file->GetLoadedSize(); in GetOatElfInformation() 50 oat_data_offset = GetOatDataAddress(elf_file.get()); in GetOatElfInformation()
|
D | elf_fixup.h | 37 static bool FixupDynamic(ElfFile& elf_file, uintptr_t base_address); 40 static bool FixupSectionHeaders(ElfFile& elf_file, uintptr_t base_address); 43 static bool FixupProgramHeaders(ElfFile& elf_file, uintptr_t base_address); 46 static bool FixupSymbols(ElfFile& elf_file, uintptr_t base_address, bool dynamic); 49 static bool FixupRelocations(ElfFile& elf_file, uintptr_t base_address);
|
D | elf_patcher.h | 36 static bool Patch(const CompilerDriver* driver, ElfFile* elf_file, 42 static bool Patch(const CompilerDriver* driver, ElfFile* elf_file, 48 static bool Patch(const CompilerDriver* driver, ElfFile* elf_file, in Patch() argument 52 return ElfPatcher::Patch(driver, elf_file, oat_location, in Patch() 56 static bool Patch(const CompilerDriver* driver, ElfFile* elf_file, in Patch() argument 60 return ElfPatcher::Patch(driver, elf_file, oat_file, oat_data_begin, in Patch() 65 ElfPatcher(const CompilerDriver* driver, ElfFile* elf_file, const OatFile* oat_file, in ElfPatcher() argument 68 : compiler_driver_(driver), elf_file_(elf_file), oat_file_(oat_file), in ElfPatcher()
|
D | elf_writer.h | 45 static uint32_t GetOatDataAddress(ElfFile* elf_file); 48 ElfWriter(const CompilerDriver& driver, File* elf_file) in ElfWriter() argument 49 : compiler_driver_(&driver), elf_file_(elf_file) { in ElfWriter()
|
D | elf_writer_mclinker.cc | 47 ElfWriterMclinker::ElfWriterMclinker(const CompilerDriver& driver, File* elf_file) in ElfWriterMclinker() argument 48 : ElfWriter(driver, elf_file), oat_input_(nullptr) { in ElfWriterMclinker() 54 bool ElfWriterMclinker::Create(File* elf_file, in Create() argument 60 ElfWriterMclinker elf_writer(driver, elf_file); in Create() 350 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(elf_file_, true, false, &error_msg)); in FixupOatMethodOffsets() local 351 CHECK(elf_file.get() != NULL) << elf_file_->GetPath() << ": " << error_msg; in FixupOatMethodOffsets() 353 uint32_t oatdata_address = GetOatDataAddress(elf_file.get()); in FixupOatMethodOffsets() 374 uint32_t offset = FixupCompiledCodeOffset(*elf_file.get(), oatdata_address, *compiled_method); in FixupOatMethodOffsets() 388 uint32_t ElfWriterMclinker::FixupCompiledCodeOffset(ElfFile& elf_file, in FixupCompiledCodeOffset() argument 397 Elf32_Addr compiled_code_address = elf_file.FindSymbolAddress(SHT_SYMTAB, in FixupCompiledCodeOffset() [all …]
|
D | elf_writer_quick.cc | 46 virtual bool Write(File* elf_file) { in Write() argument 47 if (static_cast<off_t>(offset_) != lseek(elf_file->Fd(), offset_, SEEK_SET)) { in Write() 49 << elf_file->GetPath(); in Write() 53 return DoActualWrite(elf_file); in Write() 64 virtual bool DoActualWrite(File* elf_file) = 0; 74 bool DoActualWrite(File* elf_file) OVERRIDE { in DoActualWrite() argument 77 if (!elf_file->WriteFully(data_, size_)) { in DoActualWrite() 78 PLOG(ERROR) << "Failed to write " << dbg_name_ << " for " << elf_file->GetPath(); in DoActualWrite() 100 bool DoActualWrite(File* elf_file) OVERRIDE { in DoActualWrite() argument 102 new BufferedOutputStream(new FileOutputStream(elf_file))); in DoActualWrite() [all …]
|
D | elf_writer_mclinker.h | 60 ElfWriterMclinker(const CompilerDriver& driver, File* elf_file); 71 uint32_t FixupCompiledCodeOffset(ElfFile& elf_file,
|
D | elf_writer_quick.h | 46 ElfWriterQuick(const CompilerDriver& driver, File* elf_file) in ElfWriterQuick() argument 47 : ElfWriter(driver, elf_file) {} in ElfWriterQuick() 213 File* elf_file, 222 elf_file_(elf_file), in oat_writer_()
|
D | elf_patcher.cc | 39 bool ElfPatcher::Patch(const CompilerDriver* driver, ElfFile* elf_file, in Patch() argument 55 return ElfPatcher::Patch(driver, elf_file, oat_file, in Patch()
|
D | image_writer.h | 233 void PatchOatCodeAndMethods(File* elf_file)
|
D | image_writer.cc | 1236 void ImageWriter::PatchOatCodeAndMethods(File* elf_file) { in PatchOatCodeAndMethods() argument 1238 std::unique_ptr<ElfFile> elf(ElfFile::Open(elf_file, PROT_READ|PROT_WRITE, in PatchOatCodeAndMethods()
|
/art/runtime/ |
D | oat_file.cc | 45 OatFile* OatFile::OpenWithElfFile(ElfFile* elf_file, in OpenWithElfFile() argument 49 oat_file->elf_file_.reset(elf_file); in OpenWithElfFile() 50 Elf32_Shdr* hdr = elf_file->FindSectionByName(".rodata"); in OpenWithElfFile() 51 oat_file->begin_ = elf_file->Begin() + hdr->sh_offset; in OpenWithElfFile() 52 oat_file->end_ = elf_file->Begin() + hdr->sh_size + hdr->sh_offset; in OpenWithElfFile()
|
D | elf_file.cc | 134 std::unique_ptr<ElfFile> elf_file(new ElfFile(file, writable, program_header_only, in Open() local 145 if (!elf_file->Setup(prot, flags, error_msg)) { in Open() 148 return elf_file.release(); in Open() 152 std::unique_ptr<ElfFile> elf_file(new ElfFile(file, (prot & PROT_WRITE) == PROT_WRITE, false, in Open() local 154 if (!elf_file->Setup(prot, flags, error_msg)) { in Open() 157 return elf_file.release(); in Open()
|
D | oat_file.h | 45 static OatFile* OpenWithElfFile(ElfFile* elf_file, const std::string& location,
|
D | runtime.cc | 617 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file.release(), false, false, &error_msg)); in OpenDexFilesFromImage() local 618 if (elf_file.get() == nullptr) { in OpenDexFilesFromImage() 621 std::unique_ptr<OatFile> oat_file(OatFile::OpenWithElfFile(elf_file.release(), oat_location, in OpenDexFilesFromImage()
|
D | Android.mk | 45 elf_file.cc \
|
/art/patchoat/ |
D | patchoat.h | 123 static const OatHeader* GetOatHeader(const ElfFile* elf_file);
|
D | patchoat.cc | 501 const OatHeader* PatchOat::GetOatHeader(const ElfFile* elf_file) { in GetOatHeader() argument 502 auto rodata_sec = elf_file->FindSectionByName(".rodata"); in GetOatHeader() 507 OatHeader* oat_header = reinterpret_cast<OatHeader*>(elf_file->Begin() + rodata_sec->sh_offset); in GetOatHeader()
|
/art/dex2oat/ |
D | dex2oat.cc | 341 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(oat_file, PROT_READ|PROT_WRITE, in PatchOatCode() local 343 if (elf_file.get() == NULL) { in PatchOatCode() 349 return ElfPatcher::Patch(compiler_driver, elf_file.get(), oat_location, error_msg); in PatchOatCode()
|