Store resolved Strings for AOT code in .bss.
And do some related refactorings.
Bug: 20323084
Bug: 30627598
Test: Run ART test suite including gcstress on host and Nexus 9.
Test: Run ART test suite including gcstress with baker CC on host and Nexus 9.
Test: Build aosp_mips64-eng.
Change-Id: I1b12c1570fee8e5da490b47f231050142afcbd1e
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc
index 24d102d..ea31672 100644
--- a/compiler/oat_test.cc
+++ b/compiler/oat_test.cc
@@ -112,8 +112,6 @@
compiler_kind,
insn_set,
insn_features_.get(),
- /* boot_image */ false,
- /* app_image */ false,
/* image_classes */ nullptr,
/* compiled_classes */ nullptr,
/* compiled_methods */ nullptr,
@@ -211,7 +209,10 @@
oat_writer.PrepareLayout(compiler_driver_.get(), nullptr, dex_files, &patcher);
size_t rodata_size = oat_writer.GetOatHeader().GetExecutableOffset();
size_t text_size = oat_writer.GetOatSize() - rodata_size;
- elf_writer->SetLoadedSectionSizes(rodata_size, text_size, oat_writer.GetBssSize());
+ elf_writer->PrepareDynamicSection(rodata_size,
+ text_size,
+ oat_writer.GetBssSize(),
+ oat_writer.GetBssRootsOffset());
if (!oat_writer.WriteRodata(oat_rodata)) {
return false;