Remove OatWriter buffering to memory for ElfWriterQuick
This allows the oat contents to be directly written to the file.
Change-Id: Ibc7ddf57477b152f07784b52f7334be73fd22833
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index f395428..1612f7e 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -85,6 +85,10 @@
return false;
}
oat_file_ = OatFile::OpenWritable(oat_file.get(), oat_location);
+ if (oat_file_ == NULL) {
+ LOG(ERROR) << "Failed to open writable oat file " << oat_filename << " for " << oat_location;
+ return false;
+ }
class_linker->RegisterOatFile(*oat_file_);
interpreter_to_interpreter_entry_offset_ = oat_file_->GetOatHeader().GetInterpreterToInterpreterEntryOffset();
interpreter_to_quick_entry_offset_ = oat_file_->GetOatHeader().GetInterpreterToQuickEntryOffset();