Revert "Allow method references across oat files for multi-image."
Breaks Quick tests.
This reverts commit 6065402316da2b51eed5fc34cffbd991766bd408.
Change-Id: I8a5469ba7cea5f46b85cb489b3e0ef06ed548f03
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc
index d03b4f1..894d29e 100644
--- a/compiler/oat_test.cc
+++ b/compiler/oat_test.cc
@@ -111,16 +111,17 @@
compiler_kind,
insn_set,
insn_features_.get(),
- /* boot_image */ false,
- /* image_classes */ nullptr,
- /* compiled_classes */ nullptr,
- /* compiled_methods */ nullptr,
- /* thread_count */ 2,
- /* dump_stats */ true,
- /* dump_passes */ true,
+ false,
+ nullptr,
+ nullptr,
+ nullptr,
+ 2,
+ true,
+ true,
timer_.get(),
- /* swap_fd */ -1,
- /* profile_compilation_info */ nullptr));
+ -1,
+ nullptr,
+ nullptr));
}
bool WriteElf(File* file,
@@ -200,10 +201,6 @@
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;
}
@@ -219,6 +216,7 @@
return false;
}
+ elf_writer->SetBssSize(oat_writer.GetBssSize());
elf_writer->WriteDynamicSection();
elf_writer->WriteDebugInfo(oat_writer.GetMethodDebugInfo());
elf_writer->WritePatchLocations(oat_writer.GetAbsolutePatchLocations());