From 9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 28 Feb 2014 15:21:07 +0000 Subject: Remove oat file location in the image. The oat file is now always in the same directory, and has the same name as the image file. Only difference is the extension. This also removes the need for host-prefix. Change-Id: I16d1f7aeb1d58372d41921694664e9c321afc1ad --- runtime/image.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'runtime/image.h') diff --git a/runtime/image.h b/runtime/image.h index 246f106..ce2bc58 100644 --- a/runtime/image.h +++ b/runtime/image.h @@ -88,6 +88,16 @@ class PACKED(4) ImageHeader { return RoundUp(image_size_, kPageSize); } + static std::string GetOatLocationFromImageLocation(const std::string& image) { + std::string oat_filename = image; + if (oat_filename.length() <= 3) { + return oat_filename + ".oat"; + } else { + oat_filename.replace(oat_filename.length() - 3, 3, "oat"); + } + return oat_filename; + } + enum ImageRoot { kResolutionMethod, kImtConflictMethod, @@ -95,7 +105,6 @@ class PACKED(4) ImageHeader { kCalleeSaveMethod, kRefsOnlySaveMethod, kRefsAndArgsSaveMethod, - kOatLocation, kDexCaches, kClassRoots, kImageRootsMax, -- cgit v1.1