Lines Matching full:elf_file_
168 std::string file_name(elf_file_->GetPath());
564 if (!elf_file_->WriteFully(&elf_header, sizeof(elf_header))) {
565 PLOG(ERROR) << "Failed to write ELF header for " << elf_file_->GetPath();
570 if (static_cast<off_t>(phdr_offset) != lseek(elf_file_->Fd(), 0, SEEK_CUR)) {
572 << " for " << elf_file_->GetPath();
575 if (!elf_file_->WriteFully(program_headers, sizeof(program_headers))) {
576 PLOG(ERROR) << "Failed to write ELF program headers for " << elf_file_->GetPath();
582 if (static_cast<off_t>(dynsym_offset) != lseek(elf_file_->Fd(), dynsym_offset, SEEK_SET)) {
584 << " for " << elf_file_->GetPath();
587 if (!elf_file_->WriteFully(dynsym, sizeof(dynsym))) {
588 PLOG(ERROR) << "Failed to write .dynsym for " << elf_file_->GetPath();
594 if (static_cast<off_t>(dynstr_offset) != lseek(elf_file_->Fd(), dynstr_offset, SEEK_SET)) {
596 << " for " << elf_file_->GetPath();
599 if (!elf_file_->WriteFully(&dynstr[0], dynstr_size)) {
600 PLOG(ERROR) << "Failed to write .dynsym for " << elf_file_->GetPath();
606 if (static_cast<off_t>(hash_offset) != lseek(elf_file_->Fd(), hash_offset, SEEK_SET)) {
608 << " for " << elf_file_->GetPath();
611 if (!elf_file_->WriteFully(hash, sizeof(hash))) {
612 PLOG(ERROR) << "Failed to write .dynsym for " << elf_file_->GetPath();
618 if (static_cast<off_t>(oat_data_offset) != lseek(elf_file_->Fd(), oat_data_offset, SEEK_SET)) {
620 << " for " << elf_file_->GetPath();
623 BufferedOutputStream output_stream(new FileOutputStream(elf_file_));
625 PLOG(ERROR) << "Failed to write .rodata and .text for " << elf_file_->GetPath();
631 if (static_cast<off_t>(dynamic_offset) != lseek(elf_file_->Fd(), dynamic_offset, SEEK_SET)) {
633 << " for " << elf_file_->GetPath();
636 if (!elf_file_->WriteFully(&dynamic_headers[0], dynamic_size)) {
637 PLOG(ERROR) << "Failed to write .dynamic for " << elf_file_->GetPath();
643 if (static_cast<off_t>(shstrtab_offset) != lseek(elf_file_->Fd(), shstrtab_offset, SEEK_SET)) {
645 << " for " << elf_file_->GetPath();
648 if (!elf_file_->WriteFully(&shstrtab[0], shstrtab_size)) {
649 PLOG(ERROR) << "Failed to write .shstrtab for " << elf_file_->GetPath();
655 if (static_cast<off_t>(shdr_offset) != lseek(elf_file_->Fd(), shdr_offset, SEEK_SET)) {
657 << " for " << elf_file_->GetPath();
660 if (!elf_file_->WriteFully(section_headers, sizeof(section_headers))) {
661 PLOG(ERROR) << "Failed to write ELF section headers for " << elf_file_->GetPath();
665 VLOG(compiler) << "ELF file written successfully: " << elf_file_->GetPath();