diff options
Diffstat (limited to 'compiler/oat_test.cc')
-rw-r--r-- | compiler/oat_test.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index 894d29ee99..d03b4f1055 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -111,17 +111,16 @@ class OatTest : public CommonCompilerTest { compiler_kind, insn_set, insn_features_.get(), - false, - nullptr, - nullptr, - nullptr, - 2, - true, - true, + /* boot_image */ false, + /* image_classes */ nullptr, + /* compiled_classes */ nullptr, + /* compiled_methods */ nullptr, + /* thread_count */ 2, + /* dump_stats */ true, + /* dump_passes */ true, timer_.get(), - -1, - nullptr, - nullptr)); + /* swap_fd */ -1, + /* profile_compilation_info */ nullptr)); } bool WriteElf(File* file, @@ -201,6 +200,10 @@ class OatTest : public CommonCompilerTest { class_linker->RegisterDexFile(*dex_file, runtime->GetLinearAlloc()); } oat_writer.PrepareLayout(compiler_driver_.get(), nullptr, dex_files); + size_t rodata_size = oat_writer.GetOatHeader().GetExecutableOffset(); + size_t text_size = oat_writer.GetSize() - rodata_size; + elf_writer->SetLoadedSectionSizes(rodata_size, text_size, oat_writer.GetBssSize()); + if (!oat_writer.WriteRodata(rodata)) { return false; } @@ -216,7 +219,6 @@ class OatTest : public CommonCompilerTest { return false; } - elf_writer->SetBssSize(oat_writer.GetBssSize()); elf_writer->WriteDynamicSection(); elf_writer->WriteDebugInfo(oat_writer.GetMethodDebugInfo()); elf_writer->WritePatchLocations(oat_writer.GetAbsolutePatchLocations()); |