Searched refs:elf_file (Results 1 - 21 of 21) sorted by relevance

/art/compiler/
H A Delf_writer.cc24 #include "elf_file.h"
33 uint32_t ElfWriter::GetOatDataAddress(ElfFile* elf_file) { argument
34 Elf32_Addr oatdata_address = elf_file->FindSymbolAddress(SHT_DYNSYM,
45 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, false, false, &error_msg));
46 CHECK(elf_file.get() != nullptr) << error_msg;
48 oat_loaded_size = elf_file->GetLoadedSize();
50 oat_data_offset = GetOatDataAddress(elf_file.get());
H A Delf_fixup.h37 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);
H A Delf_fixup.cc24 #include "elf_file.h"
33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, &error_msg));
34 CHECK(elf_file.get() != nullptr) << error_msg;
37 Elf32_Addr oatdata_address = ElfWriter::GetOatDataAddress(elf_file.get());
40 if (!FixupDynamic(*elf_file.get(), base_address)) {
44 if (!FixupSectionHeaders(*elf_file.get(), base_address)) {
48 if (!FixupProgramHeaders(*elf_file.get(), base_address)) {
52 if (!FixupSymbols(*elf_file.get(), base_address, true)) {
56 if (!FixupSymbols(*elf_file.get(), base_address, false)) {
60 if (!FixupRelocations(*elf_file
68 FixupDynamic(ElfFile& elf_file, uintptr_t base_address) argument
86 FixupSectionHeaders(ElfFile& elf_file, uintptr_t base_address) argument
104 FixupProgramHeaders(ElfFile& elf_file, uintptr_t base_address) argument
125 FixupSymbols(ElfFile& elf_file, uintptr_t base_address, bool dynamic) argument
149 FixupRelocations(ElfFile& elf_file, uintptr_t base_address) argument
[all...]
H A Delf_stripper.cc26 #include "elf_file.h"
33 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, true, false, error_msg));
34 if (elf_file.get() == nullptr) {
72 section_headers.reserve(elf_file->GetSectionHeaderNum());
75 Elf32_Shdr* string_section = elf_file->GetSectionNameStringSection();
77 for (Elf32_Word i = 0; i < elf_file->GetSectionHeaderNum(); i++) {
78 Elf32_Shdr* sh = elf_file->GetSectionHeader(i);
80 const char* name = elf_file->GetString(*string_section, sh->sh_name);
99 CHECK(elf_file->GetSectionHeader(1) != nullptr);
100 Elf32_Off offset = elf_file
[all...]
H A Delf_writer.h45 static uint32_t GetOatDataAddress(ElfFile* elf_file);
48 ElfWriter(const CompilerDriver& driver, File* elf_file) argument
49 : compiler_driver_(&driver), elf_file_(elf_file) {
H A Delf_patcher.h22 #include "elf_file.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,
52 return ElfPatcher::Patch(driver, elf_file, oat_location,
56 static bool Patch(const CompilerDriver* driver, ElfFile* elf_file,
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),
109 // The elf_file containin
[all...]
H A Delf_writer_mclinker.cc36 #include "elf_file.h"
47 ElfWriterMclinker::ElfWriterMclinker(const CompilerDriver& driver, File* elf_file) argument
48 : ElfWriter(driver, elf_file), oat_input_(nullptr) {
54 bool ElfWriterMclinker::Create(File* elf_file, argument
60 ElfWriterMclinker elf_writer(driver, elf_file);
350 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(elf_file_, true, false, &error_msg));
351 CHECK(elf_file.get() != NULL) << elf_file_->GetPath() << ": " << error_msg;
353 uint32_t oatdata_address = GetOatDataAddress(elf_file.get());
374 uint32_t offset = FixupCompiledCodeOffset(*elf_file.get(), oatdata_address, *compiled_method);
388 uint32_t ElfWriterMclinker::FixupCompiledCodeOffset(ElfFile& elf_file, argument
[all...]
H A Delf_writer_mclinker.h60 ElfWriterMclinker(const CompilerDriver& driver, File* elf_file);
71 uint32_t FixupCompiledCodeOffset(ElfFile& elf_file,
H A Delf_writer_quick.cc46 virtual bool Write(File* elf_file) { argument
47 if (static_cast<off_t>(offset_) != lseek(elf_file->Fd(), offset_, SEEK_SET)) {
49 << elf_file->GetPath();
53 return DoActualWrite(elf_file);
64 virtual bool DoActualWrite(File* elf_file) = 0;
74 bool DoActualWrite(File* elf_file) OVERRIDE {
77 if (!elf_file->WriteFully(data_, size_)) {
78 PLOG(ERROR) << "Failed to write " << dbg_name_ << " for " << elf_file->GetPath();
100 bool DoActualWrite(File* elf_file) OVERRIDE {
102 new BufferedOutputStream(new FileOutputStream(elf_file)));
139 WriteOutFile(const std::vector<ElfFilePiece*>& pieces, File* elf_file) argument
881 Create(File* elf_file, OatWriter* oat_writer, const std::vector<const DexFile*>& dex_files, const std::string& android_root, bool is_host, const CompilerDriver& driver) argument
[all...]
H A Delf_writer_quick.h46 ElfWriterQuick(const CompilerDriver& driver, File* elf_file) argument
47 : ElfWriter(driver, elf_file) {}
213 File* elf_file,
222 elf_file_(elf_file),
212 ElfBuilder(OatWriter* oat_writer, File* elf_file, InstructionSet isa, Elf32_Word rodata_relative_offset, Elf32_Word rodata_size, Elf32_Word text_relative_offset, Elf32_Word text_size, const bool add_symbols, bool debug = false) argument
H A Delf_patcher.cc22 #include "elf_file.h"
39 bool ElfPatcher::Patch(const CompilerDriver* driver, ElfFile* elf_file, argument
55 return ElfPatcher::Patch(driver, elf_file, oat_file,
H A Dimage_writer.h233 void PatchOatCodeAndMethods(File* elf_file)
H A Dimage_writer.cc30 #include "elf_file.h"
1236 void ImageWriter::PatchOatCodeAndMethods(File* elf_file) { argument
1238 std::unique_ptr<ElfFile> elf(ElfFile::Open(elf_file, PROT_READ|PROT_WRITE,
/art/runtime/
H A Doat_file.cc27 #include "elf_file.h"
45 OatFile* OatFile::OpenWithElfFile(ElfFile* elf_file, argument
49 oat_file->elf_file_.reset(elf_file);
50 Elf32_Shdr* hdr = elf_file->FindSectionByName(".rodata");
51 oat_file->begin_ = elf_file->Begin() + hdr->sh_offset;
52 oat_file->end_ = elf_file->Begin() + hdr->sh_size + hdr->sh_offset;
H A Doat_file.h45 static OatFile* OpenWithElfFile(ElfFile* elf_file, const std::string& location,
H A Delf_file.cc17 #include "elf_file.h"
134 std::unique_ptr<ElfFile> elf_file(new ElfFile(file, writable, program_header_only,
145 if (!elf_file->Setup(prot, flags, error_msg)) {
148 return elf_file.release();
152 std::unique_ptr<ElfFile> elf_file(new ElfFile(file, (prot & PROT_WRITE) == PROT_WRITE, false,
154 if (!elf_file->Setup(prot, flags, error_msg)) {
157 return elf_file.release();
H A Druntime.cc49 #include "elf_file.h"
617 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file.release(), false, false, &error_msg));
618 if (elf_file.get() == nullptr) {
621 std::unique_ptr<OatFile> oat_file(OatFile::OpenWithElfFile(elf_file.release(), oat_location,
H A DAndroid.mk45 elf_file.cc \
/art/patchoat/
H A Dpatchoat.h24 #include "elf_file.h"
123 static const OatHeader* GetOatHeader(const ElfFile* elf_file);
H A Dpatchoat.cc31 #include "elf_file.h"
501 const OatHeader* PatchOat::GetOatHeader(const ElfFile* elf_file) { argument
502 auto rodata_sec = elf_file->FindSectionByName(".rodata");
507 OatHeader* oat_header = reinterpret_cast<OatHeader*>(elf_file->Begin() + rodata_sec->sh_offset);
/art/dex2oat/
H A Ddex2oat.cc341 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(oat_file, PROT_READ|PROT_WRITE,
343 if (elf_file.get() == NULL) {
349 return ElfPatcher::Patch(compiler_driver, elf_file.get(), oat_location, error_msg);

Completed in 164 milliseconds