ART: Use .bss section for dex cache arrays.
Change-Id: I5fd507973b56f6a662a02a8c1dd9ac4493fb7b36
diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h
index 48fbc0b..a82d09e 100644
--- a/compiler/oat_writer.h
+++ b/compiler/oat_writer.h
@@ -90,6 +90,13 @@
TimingLogger* timings,
SafeMap<std::string, std::string>* key_value_store);
+ // Returns whether the oat file has an associated image.
+ bool HasImage() const {
+ // Since the image is being created at the same time as the oat file,
+ // check if there's an image writer.
+ return image_writer_ != nullptr;
+ }
+
const OatHeader& GetOatHeader() const {
return *oat_header_;
}
@@ -272,6 +279,10 @@
// The size of the required .bss section holding the DexCache data.
size_t bss_size_;
+ // Offsets of the dex cache arrays for each app dex file. For the
+ // boot image, this information is provided by the ImageWriter.
+ SafeMap<const DexFile*, size_t> dex_cache_arrays_offsets_;
+
// Offset of the oat data from the start of the mmapped region of the elf file.
size_t oat_data_offset_;