Elliott Hughes | 2faa5f1 | 2012-01-30 14:42:07 -0800 | [diff] [blame] | 1 | /* |
| 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 Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 16 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_OAT_FILE_H_ |
| 18 | #define ART_RUNTIME_OAT_FILE_H_ |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 19 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 20 | #include <string> |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 21 | #include <vector> |
| 22 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 23 | #include "dex_file.h" |
| 24 | #include "invoke_type.h" |
| 25 | #include "mem_map.h" |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 26 | #include "mirror/art_method.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 27 | #include "oat.h" |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 28 | #include "os.h" |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 29 | |
| 30 | namespace art { |
| 31 | |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 32 | class BitVector; |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 33 | class ElfFile; |
| 34 | class MemMap; |
| 35 | class OatMethodOffsets; |
Ian Rogers | 33e9566 | 2013-05-20 20:29:14 -0700 | [diff] [blame] | 36 | class OatHeader; |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 37 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 38 | class OatFile { |
| 39 | public: |
Brian Carlstrom | 30e2ea4 | 2013-06-19 23:25:37 -0700 | [diff] [blame] | 40 | // Returns an .odex file name next adjacent to the dex location. |
| 41 | // For example, for "/foo/bar/baz.jar", return "/foo/bar/baz.odex". |
| 42 | static std::string DexFilenameToOdexFilename(const std::string& location); |
Brian Carlstrom | b7bbba4 | 2011-10-13 14:58:47 -0700 | [diff] [blame] | 43 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 44 | // Open an oat file. Returns NULL on failure. Requested base can |
| 45 | // optionally be used to request where the file should be loaded. |
| 46 | static OatFile* Open(const std::string& filename, |
Brian Carlstrom | a004aa9 | 2012-02-08 18:05:09 -0800 | [diff] [blame] | 47 | const std::string& location, |
Brian Carlstrom | f1d3455 | 2013-07-12 20:22:23 -0700 | [diff] [blame] | 48 | byte* requested_base, |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 49 | bool executable, |
| 50 | std::string* error_msg); |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 51 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 52 | // Open an oat file from an already opened File. |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 53 | // Does not use dlopen underneath so cannot be used for runtime use |
| 54 | // where relocations may be required. Currently used from |
| 55 | // ImageWriter which wants to open a writable version from an existing |
| 56 | // file descriptor for patching. |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 57 | static OatFile* OpenWritable(File* file, const std::string& location, std::string* error_msg); |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 58 | |
| 59 | // Open an oat file backed by a std::vector with the given location. |
Brian Carlstrom | 265091e | 2013-01-30 14:08:26 -0800 | [diff] [blame] | 60 | static OatFile* OpenMemory(std::vector<uint8_t>& oat_contents, |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 61 | const std::string& location, |
| 62 | std::string* error_msg); |
Brian Carlstrom | 5b332c8 | 2012-02-01 15:02:31 -0800 | [diff] [blame] | 63 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 64 | ~OatFile(); |
| 65 | |
| 66 | const std::string& GetLocation() const { |
| 67 | return location_; |
| 68 | } |
| 69 | |
| 70 | const OatHeader& GetOatHeader() const; |
| 71 | |
| 72 | class OatDexFile; |
| 73 | |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 74 | class OatMethod { |
| 75 | public: |
Ian Rogers | b0fa5dc | 2014-04-28 16:47:08 -0700 | [diff] [blame] | 76 | void LinkMethod(mirror::ArtMethod* method) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 77 | |
| 78 | uint32_t GetCodeOffset() const { |
| 79 | return code_offset_; |
| 80 | } |
Ian Rogers | 0c7abda | 2012-09-19 13:33:42 -0700 | [diff] [blame] | 81 | uint32_t GetNativeGcMapOffset() const { |
| 82 | return native_gc_map_offset_; |
Brian Carlstrom | e7d856b | 2012-01-11 18:10:55 -0800 | [diff] [blame] | 83 | } |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 84 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 85 | const void* GetPortableCode() const { |
| 86 | // TODO: encode whether code is portable/quick in flags within OatMethod. |
| 87 | if (kUsePortableCompiler) { |
| 88 | return GetOatPointer<const void*>(code_offset_); |
| 89 | } else { |
| 90 | return nullptr; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | const void* GetQuickCode() const { |
| 95 | if (kUsePortableCompiler) { |
| 96 | return nullptr; |
| 97 | } else { |
| 98 | return GetOatPointer<const void*>(code_offset_); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | uint32_t GetPortableCodeSize() const { |
| 103 | // TODO: With Quick, we store the size before the code. With Portable, the code is in a .o |
| 104 | // file we don't manage ourselves. ELF symbols do have a concept of size, so we could capture |
| 105 | // that and store it somewhere, such as the OatMethod. |
| 106 | return 0; |
| 107 | } |
| 108 | uint32_t GetQuickCodeSize() const; |
Logan Chien | 0c717dd | 2012-03-28 18:31:07 +0800 | [diff] [blame] | 109 | |
Ian Rogers | 0c7abda | 2012-09-19 13:33:42 -0700 | [diff] [blame] | 110 | const uint8_t* GetNativeGcMap() const { |
| 111 | return GetOatPointer<const uint8_t*>(native_gc_map_offset_); |
Brian Carlstrom | e7d856b | 2012-01-11 18:10:55 -0800 | [diff] [blame] | 112 | } |
Logan Chien | 0c717dd | 2012-03-28 18:31:07 +0800 | [diff] [blame] | 113 | |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame^] | 114 | size_t GetFrameSizeInBytes() const; |
| 115 | uint32_t GetCoreSpillMask() const; |
| 116 | uint32_t GetFpSpillMask() const; |
Vladimir Marko | 8a63057 | 2014-04-09 18:45:35 +0100 | [diff] [blame] | 117 | uint32_t GetMappingTableOffset() const; |
| 118 | uint32_t GetVmapTableOffset() const; |
| 119 | const uint8_t* GetMappingTable() const; |
| 120 | const uint8_t* GetVmapTable() const; |
| 121 | |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 122 | ~OatMethod(); |
| 123 | |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 124 | // Create an OatMethod with offsets relative to the given base address |
| 125 | OatMethod(const byte* base, |
| 126 | const uint32_t code_offset, |
Brian Carlstrom | 6a47b9d | 2013-05-17 10:58:25 -0700 | [diff] [blame] | 127 | const uint32_t gc_map_offset); |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 128 | |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 129 | private: |
| 130 | template<class T> |
| 131 | T GetOatPointer(uint32_t offset) const { |
| 132 | if (offset == 0) { |
| 133 | return NULL; |
| 134 | } |
Ian Rogers | 30fab40 | 2012-01-23 15:43:46 -0800 | [diff] [blame] | 135 | return reinterpret_cast<T>(begin_ + offset); |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 136 | } |
| 137 | |
Ian Rogers | 30fab40 | 2012-01-23 15:43:46 -0800 | [diff] [blame] | 138 | const byte* begin_; |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 139 | |
| 140 | uint32_t code_offset_; |
Ian Rogers | 0c7abda | 2012-09-19 13:33:42 -0700 | [diff] [blame] | 141 | uint32_t native_gc_map_offset_; |
Brian Carlstrom | ae82698 | 2011-11-09 01:33:42 -0800 | [diff] [blame] | 142 | |
| 143 | friend class OatClass; |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 144 | }; |
| 145 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 146 | class OatClass { |
| 147 | public: |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 148 | mirror::Class::Status GetStatus() const { |
| 149 | return status_; |
| 150 | } |
| 151 | |
| 152 | OatClassType GetType() const { |
| 153 | return type_; |
| 154 | } |
Brian Carlstrom | 0755ec5 | 2012-01-11 15:19:46 -0800 | [diff] [blame] | 155 | |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 156 | // get the OatMethod entry based on its index into the class |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 157 | // defintion. direct methods come first, followed by virtual |
| 158 | // methods. note that runtime created methods such as miranda |
| 159 | // methods are not included. |
Brian Carlstrom | aded5f7 | 2011-10-07 17:15:04 -0700 | [diff] [blame] | 160 | const OatMethod GetOatMethod(uint32_t method_index) const; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 161 | |
| 162 | private: |
Brian Carlstrom | 0755ec5 | 2012-01-11 15:19:46 -0800 | [diff] [blame] | 163 | OatClass(const OatFile* oat_file, |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 164 | mirror::Class::Status status, |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 165 | OatClassType type, |
| 166 | uint32_t bitmap_size, |
| 167 | const uint32_t* bitmap_pointer, |
Brian Carlstrom | 0755ec5 | 2012-01-11 15:19:46 -0800 | [diff] [blame] | 168 | const OatMethodOffsets* methods_pointer); |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 169 | |
Vladimir Marko | d3c5beb | 2014-04-11 16:32:51 +0100 | [diff] [blame] | 170 | const OatFile* const oat_file_; |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 171 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 172 | const mirror::Class::Status status_; |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 173 | |
Vladimir Marko | d3c5beb | 2014-04-11 16:32:51 +0100 | [diff] [blame] | 174 | const OatClassType type_; |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 175 | |
Vladimir Marko | d3c5beb | 2014-04-11 16:32:51 +0100 | [diff] [blame] | 176 | const uint32_t* const bitmap_; |
Brian Carlstrom | ba150c3 | 2013-08-27 17:31:03 -0700 | [diff] [blame] | 177 | |
Brian Carlstrom | 3320cf4 | 2011-10-04 14:58:28 -0700 | [diff] [blame] | 178 | const OatMethodOffsets* methods_pointer_; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 179 | |
| 180 | friend class OatDexFile; |
| 181 | }; |
| 182 | |
| 183 | class OatDexFile { |
| 184 | public: |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 185 | // Opens the DexFile referred to by this OatDexFile from within the containing OatFile. |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 186 | const DexFile* OpenDexFile(std::string* error_msg) const; |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 187 | |
| 188 | // Returns the size of the DexFile refered to by this OatDexFile. |
Ian Rogers | 05f28c6 | 2012-10-23 18:12:13 -0700 | [diff] [blame] | 189 | size_t FileSize() const; |
Brian Carlstrom | aded5f7 | 2011-10-07 17:15:04 -0700 | [diff] [blame] | 190 | |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 191 | // Returns original path of DexFile that was the source of this OatDexFile. |
Brian Carlstrom | aded5f7 | 2011-10-07 17:15:04 -0700 | [diff] [blame] | 192 | const std::string& GetDexFileLocation() const { |
| 193 | return dex_file_location_; |
| 194 | } |
Brian Carlstrom | 58ae941 | 2011-10-04 00:56:06 -0700 | [diff] [blame] | 195 | |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 196 | // Returns checksum of original DexFile that was the source of this OatDexFile; |
Brian Carlstrom | 5b332c8 | 2012-02-01 15:02:31 -0800 | [diff] [blame] | 197 | uint32_t GetDexFileLocationChecksum() const { |
| 198 | return dex_file_location_checksum_; |
Brian Carlstrom | 58ae941 | 2011-10-04 00:56:06 -0700 | [diff] [blame] | 199 | } |
| 200 | |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 201 | // Returns the OatClass for the class specified by the given DexFile class_def_index. |
Vladimir Marko | d3c5beb | 2014-04-11 16:32:51 +0100 | [diff] [blame] | 202 | OatClass GetOatClass(uint16_t class_def_index) const; |
Brian Carlstrom | 56d947f | 2013-07-15 13:14:23 -0700 | [diff] [blame] | 203 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 204 | ~OatDexFile(); |
Elliott Hughes | a21039c | 2012-06-21 12:09:25 -0700 | [diff] [blame] | 205 | |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 206 | private: |
| 207 | OatDexFile(const OatFile* oat_file, |
Elliott Hughes | aa6a588 | 2012-01-13 19:39:16 -0800 | [diff] [blame] | 208 | const std::string& dex_file_location, |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 209 | uint32_t dex_file_checksum, |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 210 | const byte* dex_file_pointer, |
Brian Carlstrom | 0755ec5 | 2012-01-11 15:19:46 -0800 | [diff] [blame] | 211 | const uint32_t* oat_class_offsets_pointer); |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 212 | |
| 213 | const OatFile* oat_file_; |
| 214 | std::string dex_file_location_; |
Brian Carlstrom | 5b332c8 | 2012-02-01 15:02:31 -0800 | [diff] [blame] | 215 | uint32_t dex_file_location_checksum_; |
Brian Carlstrom | 8952189 | 2011-12-07 22:05:07 -0800 | [diff] [blame] | 216 | const byte* dex_file_pointer_; |
Brian Carlstrom | 0755ec5 | 2012-01-11 15:19:46 -0800 | [diff] [blame] | 217 | const uint32_t* oat_class_offsets_pointer_; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 218 | |
| 219 | friend class OatFile; |
| 220 | DISALLOW_COPY_AND_ASSIGN(OatDexFile); |
| 221 | }; |
| 222 | |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 223 | const OatDexFile* GetOatDexFile(const char* dex_location, |
Brian Carlstrom | 756ee4e | 2013-10-03 15:46:12 -0700 | [diff] [blame] | 224 | const uint32_t* const dex_location_checksum, |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 225 | bool exception_if_not_found = true) const; |
| 226 | |
Brian Carlstrom | aded5f7 | 2011-10-07 17:15:04 -0700 | [diff] [blame] | 227 | std::vector<const OatDexFile*> GetOatDexFiles() const; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 228 | |
Ian Rogers | 30fab40 | 2012-01-23 15:43:46 -0800 | [diff] [blame] | 229 | size_t Size() const { |
| 230 | return End() - Begin(); |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | private: |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 234 | static void CheckLocation(const std::string& location); |
| 235 | |
| 236 | static OatFile* OpenDlopen(const std::string& elf_filename, |
| 237 | const std::string& location, |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 238 | byte* requested_base, |
| 239 | std::string* error_msg); |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 240 | |
| 241 | static OatFile* OpenElfFile(File* file, |
| 242 | const std::string& location, |
| 243 | byte* requested_base, |
Brian Carlstrom | f1d3455 | 2013-07-12 20:22:23 -0700 | [diff] [blame] | 244 | bool writable, |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 245 | bool executable, |
| 246 | std::string* error_msg); |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 247 | |
Elliott Hughes | a51a3dd | 2011-10-17 15:19:26 -0700 | [diff] [blame] | 248 | explicit OatFile(const std::string& filename); |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 249 | bool Dlopen(const std::string& elf_filename, byte* requested_base, std::string* error_msg); |
| 250 | bool ElfFileOpen(File* file, byte* requested_base, bool writable, bool executable, |
| 251 | std::string* error_msg); |
| 252 | bool Setup(std::string* error_msg); |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 253 | |
Ian Rogers | 30fab40 | 2012-01-23 15:43:46 -0800 | [diff] [blame] | 254 | const byte* Begin() const; |
| 255 | const byte* End() const; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 256 | |
| 257 | // The oat file name. |
| 258 | // |
| 259 | // The image will embed this to link its associated oat file. |
| 260 | const std::string location_; |
| 261 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 262 | // Pointer to OatHeader. |
| 263 | const byte* begin_; |
| 264 | |
| 265 | // Pointer to end of oat region for bounds checking. |
| 266 | const byte* end_; |
| 267 | |
| 268 | // Backing memory map for oat file during when opened by ElfWriter during initial compilation. |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 269 | UniquePtr<MemMap> mem_map_; |
| 270 | |
Brian Carlstrom | 700c8d3 | 2012-11-05 10:42:02 -0800 | [diff] [blame] | 271 | // Backing memory map for oat file during cross compilation. |
| 272 | UniquePtr<ElfFile> elf_file_; |
| 273 | |
| 274 | // dlopen handle during runtime. |
| 275 | void* dlopen_handle_; |
| 276 | |
Elliott Hughes | a0e1806 | 2012-04-13 15:59:59 -0700 | [diff] [blame] | 277 | typedef SafeMap<std::string, const OatDexFile*> Table; |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 278 | Table oat_dex_files_; |
| 279 | |
| 280 | friend class OatClass; |
| 281 | friend class OatDexFile; |
Elliott Hughes | e3c845c | 2012-02-28 17:23:01 -0800 | [diff] [blame] | 282 | friend class OatDumper; // For GetBase and GetLimit |
Brian Carlstrom | e24fa61 | 2011-09-29 00:53:55 -0700 | [diff] [blame] | 283 | DISALLOW_COPY_AND_ASSIGN(OatFile); |
| 284 | }; |
| 285 | |
| 286 | } // namespace art |
| 287 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 288 | #endif // ART_RUNTIME_OAT_FILE_H_ |