Add image dependency to oat files

Change-Id: I945356f71357f1aa0092f4fe6c57eccfb029b4a6
diff --git a/src/oat_writer.h b/src/oat_writer.h
index 210a659..c3a8ff6 100644
--- a/src/oat_writer.h
+++ b/src/oat_writer.h
@@ -28,11 +28,10 @@
 #include "oat.h"
 #include "object.h"
 #include "os.h"
-#include "space.h"
 
 namespace art {
 
-// OatHeader         fixed length with count of D OatDexFiles
+// OatHeader         variable length with count of D OatDexFiles
 //
 // OatDexFile[0]     one variable sized OatDexFile with offsets to Dex and OatClasses
 // OatDexFile[1]
@@ -63,17 +62,23 @@
 class OatWriter {
  public:
   // Write an oat file. Returns true on success, false on failure.
-  static bool Create(File* file, const ClassLoader* class_loader,
-                     const std::vector<const DexFile*>& dex_files, const Compiler& compiler);
+  static bool Create(File* file,
+                     const ClassLoader* class_loader,
+                     const std::vector<const DexFile*>& dex_files,
+                     uint32_t image_file_location_checksum,
+                     const std::string& image_file_location,
+                     const Compiler& compiler);
 
  private:
 
   OatWriter(const std::vector<const DexFile*>& dex_files,
+            uint32_t image_file_location_checksum,
+            const std::string& image_file_location,
             const ClassLoader* class_loader,
             const Compiler& compiler);
   ~OatWriter();
 
-  size_t InitOatHeader(InstructionSet instruction_set);
+  size_t InitOatHeader();
   size_t InitOatDexFiles(size_t offset);
   size_t InitDexFiles(size_t offset);
   size_t InitOatClasses(size_t offset);
@@ -146,6 +151,10 @@
   // note OatFile does not take ownership of the DexFiles
   const std::vector<const DexFile*>* dex_files_;
 
+  // dependency on the image
+  uint32_t image_file_location_checksum_;
+  std::string image_file_location_;
+
   // data to write
   OatHeader* oat_header_;
   std::vector<OatDexFile*> oat_dex_files_;