summaryrefslogtreecommitdiffstats
path: root/compiler/elf_writer_quick.cc
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-09-01 15:55:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-01 15:55:17 +0000
commitdcea56f4132bc19abf867ee9ef01244d5283c2cf (patch)
tree20596be3ec95eb6ee1b36f95af4e5c24332005fc /compiler/elf_writer_quick.cc
parent893600ce548fb4cf057e2bdcf8b305eae3338f7d (diff)
parent18a49cc2f956dec648e0a13186d42374023d47a7 (diff)
downloadart-dcea56f4132bc19abf867ee9ef01244d5283c2cf.tar.gz
art-dcea56f4132bc19abf867ee9ef01244d5283c2cf.tar.bz2
art-dcea56f4132bc19abf867ee9ef01244d5283c2cf.zip
Merge "Fix frame size issue with 64-bit"
Diffstat (limited to 'compiler/elf_writer_quick.cc')
-rw-r--r--compiler/elf_writer_quick.cc24
1 files changed, 15 insertions, 9 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index e45eb61030..d011dbeada 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -979,27 +979,33 @@ bool ElfWriterQuick::Write(OatWriter* oat_writer,
Elf32_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);
-
- if (!builder.Init()) {
+ 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()) {
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();
}
void ElfWriterQuick::WriteDebugSymbols(ElfBuilder* builder, OatWriter* oat_writer) {