Add ELF extractor to oatdump.
(cherry picked from commit 0228e7eacadb1c829e4e1064bec0792c2696e66f)
Change-Id: I649b14b6f8ec9ba43f82c3670f88b064ac008ada
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index d548976..b73e997 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -200,7 +200,7 @@
llvm::OwningPtr<llvm::tool_output_file> out_file(
new llvm::tool_output_file(elf_filename_.c_str(), errmsg,
llvm::raw_fd_ostream::F_Binary));
- out_file->os().write(reinterpret_cast<const char*>(GetElfImage()), GetElfSize());
+ out_file->os().write(elf_image_.data(), elf_image_.size());
out_file->keep();
LOG(INFO) << "ELF: " << elf_filename_ << " (done)";