Fix image_test on target

Bug: 10606994
Change-Id: I39838483e59479ceb9ba014bef9086b32f2596a8
diff --git a/runtime/image.cc b/runtime/image.cc
index d11594c..dd9b6d7 100644
--- a/runtime/image.cc
+++ b/runtime/image.cc
@@ -58,6 +58,21 @@
   memcpy(version_, kImageVersion, sizeof(kImageVersion));
 }
 
+bool ImageHeader::IsValid() const {
+  if (memcmp(magic_, kImageMagic, sizeof(kImageMagic)) != 0) {
+    return false;
+  }
+  if (memcmp(version_, kImageVersion, sizeof(kImageVersion)) != 0) {
+    return false;
+  }
+  return true;
+}
+
+const char* ImageHeader::GetMagic() const {
+  CHECK(IsValid());
+  return reinterpret_cast<const char*>(magic_);
+}
+
 mirror::Object* ImageHeader::GetImageRoot(ImageRoot image_root) const {
   return GetImageRoots()->Get(image_root);
 }
diff --git a/runtime/image.h b/runtime/image.h
index 0e0a90a..2cb468f 100644
--- a/runtime/image.h
+++ b/runtime/image.h
@@ -41,20 +41,8 @@
               uint32_t oat_data_end,
               uint32_t oat_file_end);
 
-  bool IsValid() const {
-    if (memcmp(magic_, kImageMagic, sizeof(kImageMagic)) != 0) {
-      return false;
-    }
-    if (memcmp(version_, kImageVersion, sizeof(kImageVersion)) != 0) {
-      return false;
-    }
-    return true;
-  }
-
-  const char* GetMagic() const {
-    CHECK(IsValid());
-    return reinterpret_cast<const char*>(magic_);
-  }
+  bool IsValid() const;
+  const char* GetMagic() const;
 
   byte* GetImageBegin() const {
     return reinterpret_cast<byte*>(image_begin_);