Add support for .bss section in oat files.

Change-Id: I779b80b8139d9afdc28373f8c68edff5df7726ce
diff --git a/runtime/oat_file.h b/runtime/oat_file.h
index 5e68439..564185c 100644
--- a/runtime/oat_file.h
+++ b/runtime/oat_file.h
@@ -62,11 +62,6 @@
   // Opens an oat file from an already opened File. Maps it PROT_READ, MAP_PRIVATE.
   static OatFile* OpenReadable(File* file, const std::string& location, std::string* error_msg);
 
-  // Open an oat file backed by a std::vector with the given location.
-  static OatFile* OpenMemory(std::vector<uint8_t>& oat_contents,
-                             const std::string& location,
-                             std::string* error_msg);
-
   ~OatFile();
 
   bool IsExecutable() const {
@@ -274,17 +269,19 @@
     return End() - Begin();
   }
 
+  size_t BssSize() const {
+    return BssEnd() - BssBegin();
+  }
+
   const uint8_t* Begin() const;
   const uint8_t* End() const;
 
+  const uint8_t* BssBegin() const;
+  const uint8_t* BssEnd() const;
+
  private:
   static void CheckLocation(const std::string& location);
 
-  static OatFile* OpenDlopen(const std::string& elf_filename,
-                             const std::string& location,
-                             uint8_t* requested_base,
-                             std::string* error_msg);
-
   static OatFile* OpenElfFile(File* file,
                               const std::string& location,
                               uint8_t* requested_base,
@@ -294,7 +291,6 @@
                               std::string* error_msg);
 
   explicit OatFile(const std::string& filename, bool executable);
-  bool Dlopen(const std::string& elf_filename, uint8_t* requested_base, std::string* error_msg);
   bool ElfFileOpen(File* file, uint8_t* requested_base,
                    uint8_t* oat_file_begin,  // Override where the file is loaded to if not null
                    bool writable, bool executable,
@@ -312,6 +308,12 @@
   // Pointer to end of oat region for bounds checking.
   const uint8_t* end_;
 
+  // Pointer to the .bss section, if present, otherwise nullptr.
+  const uint8_t* bss_begin_;
+
+  // Pointer to the end of the .bss section, if present, otherwise nullptr.
+  const uint8_t* bss_end_;
+
   // Was this oat_file loaded executable?
   const bool is_executable_;