Fix frame size issue with 64-bit
Change-Id: Ib2f33dfb79952ba39f2d7e5303a2a2e6c4b0a0f6
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index 0216900..acbdcb1 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -1059,27 +1059,33 @@
Elf_Word oat_data_size = oat_header.GetExecutableOffset();
uint32_t oat_exec_size = oat_writer->GetSize() - oat_data_size;
- ElfBuilder builder(oat_writer, elf_file_, compiler_driver_->GetInstructionSet(), 0,
- oat_data_size, oat_data_size, oat_exec_size,
- compiler_driver_->GetCompilerOptions().GetIncludeDebugSymbols(),
- debug);
+ std::unique_ptr<ElfBuilder> builder(new ElfBuilder(
+ oat_writer,
+ elf_file_,
+ compiler_driver_->GetInstructionSet(),
+ 0,
+ oat_data_size,
+ oat_data_size,
+ oat_exec_size,
+ compiler_driver_->GetCompilerOptions().GetIncludeDebugSymbols(),
+ debug));
- if (!builder.Init()) {
+ if (!builder->Init()) {
return false;
}
if (compiler_driver_->GetCompilerOptions().GetIncludeDebugSymbols()) {
- WriteDebugSymbols(&builder, oat_writer);
+ WriteDebugSymbols(builder.get(), oat_writer);
}
if (compiler_driver_->GetCompilerOptions().GetIncludePatchInformation()) {
ElfRawSectionBuilder oat_patches(".oat_patches", SHT_OAT_PATCH, 0, NULL, 0,
sizeof(uintptr_t), sizeof(uintptr_t));
ReservePatchSpace(oat_patches.GetBuffer(), debug);
- builder.RegisterRawSection(oat_patches);
+ builder->RegisterRawSection(oat_patches);
}
- return builder.Write();
+ return builder->Write();
}
template <typename Elf_Word, typename Elf_Sword, typename Elf_Addr,