blob: da043335ff0aee1f43428c0b70fbf83648f6a186 [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070016
Brian Carlstromfc0e3212013-07-17 14:40:12 -070017#ifndef ART_RUNTIME_IMAGE_H_
18#define ART_RUNTIME_IMAGE_H_
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070019
20#include <string.h>
21
Vladimir Marko6cfbdbc2017-07-25 13:26:39 +010022#include "base/bit_utils.h"
Andreas Gampe542451c2016-07-26 09:02:02 -070023#include "base/enums.h"
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070024#include "globals.h"
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080025#include "mirror/object.h"
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070026
27namespace art {
28
Mathieu Chartier54d220e2015-07-30 16:20:06 -070029class ArtField;
30class ArtMethod;
31
David Sehra49e0532017-08-25 08:05:29 -070032class ObjectVisitor {
33 public:
34 virtual ~ObjectVisitor() {}
35
36 virtual void Visit(mirror::Object* object) = 0;
37};
38
Mathieu Chartier54d220e2015-07-30 16:20:06 -070039class ArtMethodVisitor {
40 public:
41 virtual ~ArtMethodVisitor() {}
42
43 virtual void Visit(ArtMethod* method) = 0;
44};
45
46class ArtFieldVisitor {
47 public:
48 virtual ~ArtFieldVisitor() {}
49
50 virtual void Visit(ArtField* method) = 0;
51};
52
Mathieu Chartiere401d142015-04-22 13:56:20 -070053class PACKED(4) ImageSection {
54 public:
55 ImageSection() : offset_(0), size_(0) { }
56 ImageSection(uint32_t offset, uint32_t size) : offset_(offset), size_(size) { }
57 ImageSection(const ImageSection& section) = default;
58 ImageSection& operator=(const ImageSection& section) = default;
59
60 uint32_t Offset() const {
61 return offset_;
62 }
63
64 uint32_t Size() const {
65 return size_;
66 }
67
68 uint32_t End() const {
69 return Offset() + Size();
70 }
71
72 bool Contains(uint64_t offset) const {
73 return offset - offset_ < size_;
74 }
75
76 private:
77 uint32_t offset_;
78 uint32_t size_;
79};
80
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070081// header of image files written by ImageWriter, read and validated by Space.
Ian Rogersdf1ce912012-11-27 17:07:11 -080082class PACKED(4) ImageHeader {
Brian Carlstrom4a289ed2011-08-16 17:17:49 -070083 public:
Mathieu Chartierceb07b32015-12-10 09:33:21 -080084 enum StorageMode : uint32_t {
85 kStorageModeUncompressed,
86 kStorageModeLZ4,
Mathieu Chartiera6e81ed2016-02-25 13:52:10 -080087 kStorageModeLZ4HC,
Mathieu Chartierceb07b32015-12-10 09:33:21 -080088 kStorageModeCount, // Number of elements in enum.
89 };
90 static constexpr StorageMode kDefaultStorageMode = kStorageModeUncompressed;
91
Sebastien Hertzaa50d3a2015-08-25 15:25:41 +020092 ImageHeader()
Mathieu Chartierceb07b32015-12-10 09:33:21 -080093 : image_begin_(0U),
94 image_size_(0U),
95 oat_checksum_(0U),
96 oat_file_begin_(0U),
97 oat_data_begin_(0U),
98 oat_data_end_(0U),
99 oat_file_end_(0U),
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800100 boot_image_begin_(0U),
101 boot_image_size_(0U),
102 boot_oat_begin_(0U),
103 boot_oat_size_(0U),
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800104 patch_delta_(0),
105 image_roots_(0U),
106 pointer_size_(0U),
107 compile_pic_(0),
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800108 is_pic_(0),
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800109 storage_mode_(kDefaultStorageMode),
110 data_size_(0) {}
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700111
Ian Rogers30fab402012-01-23 15:43:46 -0800112 ImageHeader(uint32_t image_begin,
Mathieu Chartier763a31e2015-11-16 16:05:55 -0800113 uint32_t image_size,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700114 ImageSection* sections,
Brian Carlstrome24fa612011-09-29 00:53:55 -0700115 uint32_t image_roots,
116 uint32_t oat_checksum,
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800117 uint32_t oat_file_begin,
118 uint32_t oat_data_begin,
119 uint32_t oat_data_end,
Igor Murashkin46774762014-10-22 11:37:02 -0700120 uint32_t oat_file_end,
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800121 uint32_t boot_image_begin,
122 uint32_t boot_image_size,
123 uint32_t boot_oat_begin,
124 uint32_t boot_oat_size,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700125 uint32_t pointer_size,
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800126 bool compile_pic,
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800127 bool is_pic,
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800128 StorageMode storage_mode,
129 size_t data_size);
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700130
Brian Carlstrom68708f52013-09-03 14:15:31 -0700131 bool IsValid() const;
132 const char* GetMagic() const;
Brian Carlstrom78128a62011-09-15 17:21:19 -0700133
Ian Rogers13735952014-10-08 12:43:28 -0700134 uint8_t* GetImageBegin() const {
135 return reinterpret_cast<uint8_t*>(image_begin_);
Brian Carlstrome24fa612011-09-29 00:53:55 -0700136 }
137
Mathieu Chartier31e89252013-08-28 11:29:12 -0700138 size_t GetImageSize() const {
139 return static_cast<uint32_t>(image_size_);
140 }
141
Brian Carlstrome24fa612011-09-29 00:53:55 -0700142 uint32_t GetOatChecksum() const {
143 return oat_checksum_;
144 }
145
Brian Carlstroma85b8372012-10-18 17:00:32 -0700146 void SetOatChecksum(uint32_t oat_checksum) {
147 oat_checksum_ = oat_checksum;
148 }
149
Mathieu Chartier5351da02016-02-17 16:19:53 -0800150 // The location that the oat file was expected to be when the image was created. The actual
151 // oat file may be at a different location for application images.
Ian Rogers13735952014-10-08 12:43:28 -0700152 uint8_t* GetOatFileBegin() const {
153 return reinterpret_cast<uint8_t*>(oat_file_begin_);
Brian Carlstrome24fa612011-09-29 00:53:55 -0700154 }
155
Ian Rogers13735952014-10-08 12:43:28 -0700156 uint8_t* GetOatDataBegin() const {
157 return reinterpret_cast<uint8_t*>(oat_data_begin_);
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800158 }
159
Ian Rogers13735952014-10-08 12:43:28 -0700160 uint8_t* GetOatDataEnd() const {
161 return reinterpret_cast<uint8_t*>(oat_data_end_);
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800162 }
163
Ian Rogers13735952014-10-08 12:43:28 -0700164 uint8_t* GetOatFileEnd() const {
165 return reinterpret_cast<uint8_t*>(oat_file_end_);
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700166 }
167
Andreas Gampebda1d602016-08-29 17:43:45 -0700168 PointerSize GetPointerSize() const;
Andreas Gampe542451c2016-07-26 09:02:02 -0700169
170 uint32_t GetPointerSizeUnchecked() const {
Mathieu Chartiere401d142015-04-22 13:56:20 -0700171 return pointer_size_;
172 }
173
Alex Light53cb16b2014-06-12 11:26:29 -0700174 off_t GetPatchDelta() const {
175 return patch_delta_;
176 }
177
Nicolas Geoffray9583fbc2014-02-28 15:21:07 +0000178 static std::string GetOatLocationFromImageLocation(const std::string& image) {
David Brazdil7b49e6c2016-09-01 11:06:18 +0100179 return GetLocationFromImageLocation(image, "oat");
180 }
181
182 static std::string GetVdexLocationFromImageLocation(const std::string& image) {
183 return GetLocationFromImageLocation(image, "vdex");
Nicolas Geoffray9583fbc2014-02-28 15:21:07 +0000184 }
185
Mathieu Chartiere401d142015-04-22 13:56:20 -0700186 enum ImageMethod {
Ian Rogers19846512012-02-24 11:42:47 -0800187 kResolutionMethod,
Jeff Hao88474b42013-10-23 16:24:40 -0700188 kImtConflictMethod,
Mathieu Chartier2d2621a2014-10-23 16:48:06 -0700189 kImtUnimplementedMethod,
Vladimir Markofd36f1f2016-08-03 18:49:58 +0100190 kSaveAllCalleeSavesMethod,
191 kSaveRefsOnlyMethod,
192 kSaveRefsAndArgsMethod,
Vladimir Marko952dbb12016-07-28 12:01:51 +0100193 kSaveEverythingMethod,
Mingyao Yang0a87a652017-04-12 13:43:15 -0700194 kSaveEverythingMethodForClinit,
195 kSaveEverythingMethodForSuspendCheck,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700196 kImageMethodsCount, // Number of elements in enum.
197 };
198
199 enum ImageRoot {
Brian Carlstrom58ae9412011-10-04 00:56:06 -0700200 kDexCaches,
Brian Carlstrom34f426c2011-10-04 12:58:02 -0700201 kClassRoots,
Vladimir Markoeca3eda2016-11-09 16:26:44 +0000202 kClassLoader, // App image only.
Brian Carlstrom16192862011-09-12 17:50:06 -0700203 kImageRootsMax,
204 };
205
Mathieu Chartiere401d142015-04-22 13:56:20 -0700206 enum ImageSections {
207 kSectionObjects,
208 kSectionArtFields,
209 kSectionArtMethods,
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700210 kSectionRuntimeMethods,
Artem Udovichenkoa62cb9b2016-06-30 09:18:25 +0000211 kSectionImTables,
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700212 kSectionIMTConflictTables,
Vladimir Marko05792b92015-08-03 11:56:49 +0100213 kSectionDexCacheArrays,
Mathieu Chartierd39645e2015-06-09 17:50:29 -0700214 kSectionInternedStrings,
Mathieu Chartier208a5cb2015-12-02 15:44:07 -0800215 kSectionClassTable,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700216 kSectionImageBitmap,
217 kSectionCount, // Number of elements in enum.
218 };
219
Vladimir Markoeca3eda2016-11-09 16:26:44 +0000220 static size_t NumberOfImageRoots(bool app_image) {
221 return app_image ? kImageRootsMax : kImageRootsMax - 1u;
222 }
223
Mathieu Chartiere401d142015-04-22 13:56:20 -0700224 ArtMethod* GetImageMethod(ImageMethod index) const;
225 void SetImageMethod(ImageMethod index, ArtMethod* method);
226
Vladimir Markocd87c3e2017-09-05 13:11:57 +0100227 const ImageSection& GetImageSection(ImageSections index) const {
228 DCHECK_LT(static_cast<size_t>(index), kSectionCount);
229 return sections_[index];
230 }
231
232 const ImageSection& GetObjectsSection() const {
233 return GetImageSection(kSectionObjects);
234 }
235
236 const ImageSection& GetFieldsSection() const {
237 return GetImageSection(ImageHeader::kSectionArtFields);
238 }
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700239
Mathieu Chartiere401d142015-04-22 13:56:20 -0700240 const ImageSection& GetMethodsSection() const {
241 return GetImageSection(kSectionArtMethods);
242 }
243
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700244 const ImageSection& GetRuntimeMethodsSection() const {
245 return GetImageSection(kSectionRuntimeMethods);
246 }
247
Vladimir Markocd87c3e2017-09-05 13:11:57 +0100248 const ImageSection& GetImTablesSection() const {
249 return GetImageSection(kSectionImTables);
250 }
251
252 const ImageSection& GetIMTConflictTablesSection() const {
253 return GetImageSection(kSectionIMTConflictTables);
254 }
255
256 const ImageSection& GetDexCacheArraysSection() const {
257 return GetImageSection(kSectionDexCacheArrays);
258 }
259
260 const ImageSection& GetInternedStringsSection() const {
261 return GetImageSection(kSectionInternedStrings);
262 }
263
264 const ImageSection& GetClassTableSection() const {
265 return GetImageSection(kSectionClassTable);
266 }
267
268 const ImageSection& GetImageBitmapSection() const {
269 return GetImageSection(kSectionImageBitmap);
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700270 }
271
Mathieu Chartier4a26f172016-01-26 14:26:18 -0800272 template <ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800273 mirror::Object* GetImageRoot(ImageRoot image_root) const
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700274 REQUIRES_SHARED(Locks::mutator_lock_);
Mathieu Chartier4a26f172016-01-26 14:26:18 -0800275
276 template <ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
Hiroshi Yamauchi2cd334a2015-01-09 14:03:35 -0800277 mirror::ObjectArray<mirror::Object>* GetImageRoots() const
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700278 REQUIRES_SHARED(Locks::mutator_lock_);
Brian Carlstromaded5f72011-10-07 17:15:04 -0700279
Alex Light53cb16b2014-06-12 11:26:29 -0700280 void RelocateImage(off_t delta);
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800281 void RelocateImageMethods(off_t delta);
282 void RelocateImageObjects(off_t delta);
Alex Light53cb16b2014-06-12 11:26:29 -0700283
Igor Murashkin46774762014-10-22 11:37:02 -0700284 bool CompilePic() const {
285 return compile_pic_ != 0;
286 }
287
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800288 bool IsPic() const {
289 return is_pic_ != 0;
290 }
291
292 uint32_t GetBootImageBegin() const {
293 return boot_image_begin_;
294 }
295
296 uint32_t GetBootImageSize() const {
297 return boot_image_size_;
298 }
299
300 uint32_t GetBootOatBegin() const {
301 return boot_oat_begin_;
302 }
303
304 uint32_t GetBootOatSize() const {
305 return boot_oat_size_;
306 }
307
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800308 StorageMode GetStorageMode() const {
309 return storage_mode_;
310 }
311
312 uint64_t GetDataSize() const {
313 return data_size_;
314 }
315
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800316 bool IsAppImage() const {
317 // App images currently require a boot image, if the size is non zero then it is an app image
318 // header.
319 return boot_image_size_ != 0u;
320 }
321
Vladimir Marko6cfbdbc2017-07-25 13:26:39 +0100322 uint32_t GetBootImageConstantTablesOffset() const {
323 // Interned strings table and class table for boot image are mmapped read only.
324 DCHECK(!IsAppImage());
325 const ImageSection& interned_strings = GetInternedStringsSection();
326 DCHECK_ALIGNED(interned_strings.Offset(), kPageSize);
327 return interned_strings.Offset();
328 }
329
330 uint32_t GetBootImageConstantTablesSize() const {
331 uint32_t start_offset = GetBootImageConstantTablesOffset();
332 const ImageSection& class_table = GetClassTableSection();
333 DCHECK_LE(start_offset, class_table.Offset());
334 size_t tables_size = class_table.Offset() + class_table.Size() - start_offset;
335 return RoundUp(tables_size, kPageSize);
336 }
337
David Sehra49e0532017-08-25 08:05:29 -0700338 // Visit mirror::Objects in the section starting at base.
339 // TODO: Delete base parameter if it is always equal to GetImageBegin.
340 void VisitObjects(ObjectVisitor* visitor,
341 uint8_t* base,
342 PointerSize pointer_size) const
343 REQUIRES_SHARED(Locks::mutator_lock_);
344
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700345 // Visit ArtMethods in the section starting at base. Includes runtime methods.
346 // TODO: Delete base parameter if it is always equal to GetImageBegin.
Andreas Gampe542451c2016-07-26 09:02:02 -0700347 void VisitPackedArtMethods(ArtMethodVisitor* visitor,
348 uint8_t* base,
349 PointerSize pointer_size) const;
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700350
351 // Visit ArtMethods in the section starting at base.
352 // TODO: Delete base parameter if it is always equal to GetImageBegin.
353 void VisitPackedArtFields(ArtFieldVisitor* visitor, uint8_t* base) const;
354
355 template <typename Visitor>
Artem Udovichenkoa62cb9b2016-06-30 09:18:25 +0000356 void VisitPackedImTables(const Visitor& visitor,
357 uint8_t* base,
Andreas Gampe542451c2016-07-26 09:02:02 -0700358 PointerSize pointer_size) const;
Artem Udovichenkoa62cb9b2016-06-30 09:18:25 +0000359
360 template <typename Visitor>
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700361 void VisitPackedImtConflictTables(const Visitor& visitor,
362 uint8_t* base,
Andreas Gampe542451c2016-07-26 09:02:02 -0700363 PointerSize pointer_size) const;
Mathieu Chartiere42888f2016-04-14 10:49:19 -0700364
Alex Light53cb16b2014-06-12 11:26:29 -0700365 private:
Ian Rogers13735952014-10-08 12:43:28 -0700366 static const uint8_t kImageMagic[4];
367 static const uint8_t kImageVersion[4];
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700368
David Brazdil7b49e6c2016-09-01 11:06:18 +0100369 static std::string GetLocationFromImageLocation(const std::string& image,
370 const std::string& extension) {
371 std::string filename = image;
372 if (filename.length() <= 3) {
373 filename += "." + extension;
374 } else {
375 filename.replace(filename.length() - 3, 3, extension);
376 }
377 return filename;
378 }
379
Ian Rogers13735952014-10-08 12:43:28 -0700380 uint8_t magic_[4];
381 uint8_t version_[4];
Brian Carlstroma663ea52011-08-19 23:33:41 -0700382
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800383 // Required base address for mapping the image.
Ian Rogers30fab402012-01-23 15:43:46 -0800384 uint32_t image_begin_;
Brian Carlstrome24fa612011-09-29 00:53:55 -0700385
Mathieu Chartier31e89252013-08-28 11:29:12 -0700386 // Image size, not page aligned.
387 uint32_t image_size_;
388
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800389 // Checksum of the oat file we link to for load time sanity check.
Brian Carlstrome24fa612011-09-29 00:53:55 -0700390 uint32_t oat_checksum_;
391
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800392 // Start address for oat file. Will be before oat_data_begin_ for .so files.
393 uint32_t oat_file_begin_;
Brian Carlstrome24fa612011-09-29 00:53:55 -0700394
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800395 // Required oat address expected by image Method::GetCode() pointers.
396 uint32_t oat_data_begin_;
Brian Carlstrom16192862011-09-12 17:50:06 -0700397
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800398 // End of oat data address range for this image file.
399 uint32_t oat_data_end_;
400
401 // End of oat file address range. will be after oat_data_end_ for
402 // .so files. Used for positioning a following alloc spaces.
403 uint32_t oat_file_end_;
404
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800405 // Boot image begin and end (app image headers only).
406 uint32_t boot_image_begin_;
407 uint32_t boot_image_size_;
408
409 // Boot oat begin and end (app image headers only).
410 uint32_t boot_oat_begin_;
411 uint32_t boot_oat_size_;
412
413 // TODO: We should probably insert a boot image checksum for app images.
414
Alex Light53cb16b2014-06-12 11:26:29 -0700415 // The total delta that this image has been patched.
416 int32_t patch_delta_;
417
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800418 // Absolute address of an Object[] of objects needed to reinitialize from an image.
Brian Carlstrom16192862011-09-12 17:50:06 -0700419 uint32_t image_roots_;
420
Mathieu Chartiere401d142015-04-22 13:56:20 -0700421 // Pointer size, this affects the size of the ArtMethods.
422 uint32_t pointer_size_;
423
Igor Murashkin46774762014-10-22 11:37:02 -0700424 // Boolean (0 or 1) to denote if the image was compiled with --compile-pic option
425 const uint32_t compile_pic_;
426
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800427 // Boolean (0 or 1) to denote if the image can be mapped at a random address, this only refers to
428 // the .art file. Currently, app oat files do not depend on their app image. There are no pointers
429 // from the app oat code to the app image.
430 const uint32_t is_pic_;
431
Mathieu Chartier67ad20e2015-12-09 15:41:09 -0800432 // Image section sizes/offsets correspond to the uncompressed form.
Mathieu Chartiere401d142015-04-22 13:56:20 -0700433 ImageSection sections_[kSectionCount];
434
Mathieu Chartierfbc31082016-01-24 11:59:56 -0800435 // Image methods, may be inside of the boot image for app images.
Mathieu Chartiere401d142015-04-22 13:56:20 -0700436 uint64_t image_methods_[kImageMethodsCount];
437
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800438 // Storage method for the image, the image may be compressed.
439 StorageMode storage_mode_;
440
441 // Data size for the image data excluding the bitmap and the header. For compressed images, this
442 // is the compressed size in the file.
443 uint32_t data_size_;
444
Brian Carlstrom16192862011-09-12 17:50:06 -0700445 friend class ImageWriter;
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700446};
447
Mathieu Chartiere401d142015-04-22 13:56:20 -0700448std::ostream& operator<<(std::ostream& os, const ImageHeader::ImageMethod& policy);
449std::ostream& operator<<(std::ostream& os, const ImageHeader::ImageRoot& policy);
450std::ostream& operator<<(std::ostream& os, const ImageHeader::ImageSections& section);
451std::ostream& operator<<(std::ostream& os, const ImageSection& section);
Mathieu Chartierceb07b32015-12-10 09:33:21 -0800452std::ostream& operator<<(std::ostream& os, const ImageHeader::StorageMode& mode);
Mathieu Chartiere401d142015-04-22 13:56:20 -0700453
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700454} // namespace art
455
Brian Carlstromfc0e3212013-07-17 14:40:12 -0700456#endif // ART_RUNTIME_IMAGE_H_