blob: 670accbbafe1810f506e6ae07c9209ef106b1d39 [file] [log] [blame]
Brian Carlstrom7940e442013-07-12 13:46:57 -07001/*
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 */
16
Brian Carlstromfc0e3212013-07-17 14:40:12 -070017#ifndef ART_COMPILER_OAT_WRITER_H_
18#define ART_COMPILER_OAT_WRITER_H_
Brian Carlstrom7940e442013-07-12 13:46:57 -070019
20#include <stdint.h>
Brian Carlstrom7940e442013-07-12 13:46:57 -070021#include <cstddef>
Ian Rogers700a4022014-05-19 16:49:03 -070022#include <memory>
Brian Carlstrom7940e442013-07-12 13:46:57 -070023
David Brazdild9c90372016-09-14 16:53:55 +010024#include "base/array_ref.h"
Vladimir Marko49b0f452015-12-10 13:49:19 +000025#include "base/dchecked_vector.h"
Vladimir Markob163bb72015-03-31 21:49:49 +010026#include "linker/relative_patcher.h" // For linker::RelativePatcherTargetProvider.
Brian Carlstrom7940e442013-07-12 13:46:57 -070027#include "mem_map.h"
Vladimir Markof4da6752014-08-01 19:04:18 +010028#include "method_reference.h"
Brian Carlstrom7940e442013-07-12 13:46:57 -070029#include "mirror/class.h"
Artem Udovichenkod9786b02015-10-14 16:36:55 +030030#include "oat.h"
Vladimir Marko9bdf1082016-01-21 12:15:52 +000031#include "os.h"
Brian Carlstrom7940e442013-07-12 13:46:57 -070032#include "safe_map.h"
Brian Carlstrom7940e442013-07-12 13:46:57 -070033
34namespace art {
35
Brian Carlstromba150c32013-08-27 17:31:03 -070036class BitVector;
Andreas Gampe79273802014-08-05 20:21:05 -070037class CompiledMethod;
Vladimir Marko20f85592015-03-19 10:07:02 +000038class CompilerDriver;
Vladimir Markof4da6752014-08-01 19:04:18 +010039class ImageWriter;
Brian Carlstrom7940e442013-07-12 13:46:57 -070040class OutputStream;
Vladimir Marko20f85592015-03-19 10:07:02 +000041class TimingLogger;
Artem Udovichenkod9786b02015-10-14 16:36:55 +030042class TypeLookupTable;
Vladimir Marko9bdf1082016-01-21 12:15:52 +000043class ZipEntry;
Brian Carlstrom7940e442013-07-12 13:46:57 -070044
David Srbeckyc5bfa972016-02-05 15:49:10 +000045namespace debug {
Vladimir Marko10c13562015-11-25 14:33:36 +000046struct MethodDebugInfo;
David Srbeckyc5bfa972016-02-05 15:49:10 +000047} // namespace debug
Vladimir Marko10c13562015-11-25 14:33:36 +000048
Vladimir Marko944da602016-02-19 12:27:55 +000049namespace linker {
50class MultiOatRelativePatcher;
51} // namespace linker
52
David Brazdil5d5a36b2016-09-14 15:34:10 +010053namespace verifier {
54 class VerifierDeps;
55} // namespace verifier
56
Brian Carlstrom7940e442013-07-12 13:46:57 -070057// OatHeader variable length with count of D OatDexFiles
58//
59// OatDexFile[0] one variable sized OatDexFile with offsets to Dex and OatClasses
60// OatDexFile[1]
61// ...
62// OatDexFile[D]
63//
Artem Udovichenkod9786b02015-10-14 16:36:55 +030064// TypeLookupTable[0] one descriptor to class def index hash table for each OatDexFile.
65// TypeLookupTable[1]
66// ...
67// TypeLookupTable[D]
68//
Vladimir Marko9bdf1082016-01-21 12:15:52 +000069// ClassOffsets[0] one table of OatClass offsets for each class def for each OatDexFile.
70// ClassOffsets[1]
71// ...
72// ClassOffsets[D]
73//
Brian Carlstrom7940e442013-07-12 13:46:57 -070074// OatClass[0] one variable sized OatClass for each of C DexFile::ClassDefs
75// OatClass[1] contains OatClass entries with class status, offsets to code, etc.
76// ...
77// OatClass[C]
78//
Vladimir Marko96c6ab92014-04-08 14:00:50 +010079// GcMap one variable sized blob with GC map.
80// GcMap GC maps are deduplicated.
81// ...
82// GcMap
83//
84// VmapTable one variable sized VmapTable blob (quick compiler only).
85// VmapTable VmapTables are deduplicated.
86// ...
87// VmapTable
88//
89// MappingTable one variable sized blob with MappingTable (quick compiler only).
90// MappingTable MappingTables are deduplicated.
91// ...
92// MappingTable
93//
Brian Carlstrom7940e442013-07-12 13:46:57 -070094// padding if necessary so that the following code will be page aligned
95//
Vladimir Marko96c6ab92014-04-08 14:00:50 +010096// OatMethodHeader fixed size header for a CompiledMethod including the size of the MethodCode.
97// MethodCode one variable sized blob with the code of a CompiledMethod.
98// OatMethodHeader (OatMethodHeader, MethodCode) pairs are deduplicated.
99// MethodCode
Brian Carlstrom7940e442013-07-12 13:46:57 -0700100// ...
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100101// OatMethodHeader
102// MethodCode
Brian Carlstrom7940e442013-07-12 13:46:57 -0700103//
104class OatWriter {
105 public:
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000106 enum class CreateTypeLookupTable {
107 kCreate,
108 kDontCreate,
109 kDefault = kCreate
110 };
111
112 OatWriter(bool compiling_boot_image, TimingLogger* timings);
113
114 // To produce a valid oat file, the user must first add sources with any combination of
115 // - AddDexFileSource(),
116 // - AddZippedDexFilesSource(),
117 // - AddRawDexFileSource().
118 // Then the user must call in order
119 // - WriteAndOpenDexFiles()
120 // - PrepareLayout(),
121 // - WriteRodata(),
122 // - WriteCode(),
123 // - WriteHeader().
124
125 // Add dex file source(s) from a file, either a plain dex file or
126 // a zip file with one or more dex files.
127 bool AddDexFileSource(
128 const char* filename,
129 const char* location,
130 CreateTypeLookupTable create_type_lookup_table = CreateTypeLookupTable::kDefault);
131 // Add dex file source(s) from a zip file specified by a file handle.
132 bool AddZippedDexFilesSource(
Andreas Gampe43e10b02016-07-15 17:17:34 -0700133 File&& zip_fd,
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000134 const char* location,
135 CreateTypeLookupTable create_type_lookup_table = CreateTypeLookupTable::kDefault);
136 // Add dex file source from raw memory.
137 bool AddRawDexFileSource(
138 const ArrayRef<const uint8_t>& data,
139 const char* location,
140 uint32_t location_checksum,
141 CreateTypeLookupTable create_type_lookup_table = CreateTypeLookupTable::kDefault);
142 dchecked_vector<const char*> GetSourceLocations() const;
143
David Brazdil7b49e6c2016-09-01 11:06:18 +0100144 // Write raw dex files to the vdex file, mmap the file and open the dex files from it.
145 // Supporting data structures are written into the .rodata section of the oat file.
146 // The `verify` setting dictates whether the dex file verifier should check the dex files.
147 // This is generally the case, and should only be false for tests.
148 bool WriteAndOpenDexFiles(File* vdex_file,
149 OutputStream* oat_rodata,
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000150 InstructionSet instruction_set,
151 const InstructionSetFeatures* instruction_set_features,
152 SafeMap<std::string, std::string>* key_value_store,
Andreas Gampe3a2bd292016-01-26 17:23:47 -0800153 bool verify,
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000154 /*out*/ std::unique_ptr<MemMap>* opened_dex_files_map,
155 /*out*/ std::vector<std::unique_ptr<const DexFile>>* opened_dex_files);
David Brazdil5d5a36b2016-09-14 15:34:10 +0100156 bool WriteVerifierDeps(OutputStream* vdex_out, verifier::VerifierDeps* verifier_deps);
157 bool WriteVdexHeader(OutputStream* vdex_out);
158
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000159 // Prepare layout of remaining data.
160 void PrepareLayout(const CompilerDriver* compiler,
161 ImageWriter* image_writer,
Vladimir Marko944da602016-02-19 12:27:55 +0000162 const std::vector<const DexFile*>& dex_files,
163 linker::MultiOatRelativePatcher* relative_patcher);
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000164 // Write the rest of .rodata section (ClassOffsets[], OatClass[], maps).
165 bool WriteRodata(OutputStream* out);
166 // Write the code to the .text section.
167 bool WriteCode(OutputStream* out);
168 // Write the oat header. This finalizes the oat file.
169 bool WriteHeader(OutputStream* out,
170 uint32_t image_file_location_oat_checksum,
171 uintptr_t image_file_location_oat_begin,
172 int32_t image_patch_delta);
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700173
Vladimir Marko09d09432015-09-08 13:47:48 +0100174 // Returns whether the oat file has an associated image.
175 bool HasImage() const {
176 // Since the image is being created at the same time as the oat file,
177 // check if there's an image writer.
178 return image_writer_ != nullptr;
179 }
180
Mathieu Chartierda5b28a2015-11-05 08:03:47 -0800181 bool HasBootImage() const {
182 return compiling_boot_image_;
183 }
184
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700185 const OatHeader& GetOatHeader() const {
186 return *oat_header_;
187 }
188
David Brazdil7b49e6c2016-09-01 11:06:18 +0100189 size_t GetOatSize() const {
190 return oat_size_;
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700191 }
192
Vladimir Marko5c42c292015-02-25 12:02:49 +0000193 size_t GetBssSize() const {
194 return bss_size_;
195 }
196
Vladimir Marko944da602016-02-19 12:27:55 +0000197 size_t GetOatDataOffset() const {
198 return oat_data_offset_;
199 }
200
Vladimir Marko49b0f452015-12-10 13:49:19 +0000201 ArrayRef<const uintptr_t> GetAbsolutePatchLocations() const {
202 return ArrayRef<const uintptr_t>(absolute_patch_locations_);
Vladimir Markof4da6752014-08-01 19:04:18 +0100203 }
204
Brian Carlstrom7940e442013-07-12 13:46:57 -0700205 ~OatWriter();
206
David Srbecky09c2a6b2016-03-11 17:11:44 +0000207 void AddMethodDebugInfos(const std::vector<debug::MethodDebugInfo>& infos) {
208 method_info_.insert(method_info_.end(), infos.begin(), infos.end());
209 }
210
David Srbeckyc5bfa972016-02-05 15:49:10 +0000211 ArrayRef<const debug::MethodDebugInfo> GetMethodDebugInfo() const {
212 return ArrayRef<const debug::MethodDebugInfo>(method_info_);
Mark Mendellae9fd932014-02-10 16:14:35 -0800213 }
214
Vladimir Markob163bb72015-03-31 21:49:49 +0100215 const CompilerDriver* GetCompilerDriver() {
216 return compiler_driver_;
217 }
218
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700219 private:
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000220 class DexFileSource;
Vladimir Marko49b0f452015-12-10 13:49:19 +0000221 class OatClass;
222 class OatDexFile;
223
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100224 // The function VisitDexMethods() below iterates through all the methods in all
225 // the compiled dex files in order of their definitions. The method visitor
226 // classes provide individual bits of processing for each of the passes we need to
227 // first collect the data we want to write to the oat file and then, in later passes,
228 // to actually write it.
229 class DexMethodVisitor;
230 class OatDexMethodVisitor;
231 class InitOatClassesMethodVisitor;
232 class InitCodeMethodVisitor;
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100233 class InitMapMethodVisitor;
234 class InitImageMethodVisitor;
235 class WriteCodeMethodVisitor;
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100236 class WriteMapMethodVisitor;
237
238 // Visit all the methods in all the compiled dex files in their definition order
239 // with a given DexMethodVisitor.
240 bool VisitDexMethods(DexMethodVisitor* visitor);
241
David Brazdil7b49e6c2016-09-01 11:06:18 +0100242 bool WriteDexFiles(OutputStream* out, File* file);
243 bool WriteDexFile(OutputStream* out, File* file, OatDexFile* oat_dex_file);
244 bool SeekToDexFile(OutputStream* out, File* file, OatDexFile* oat_dex_file);
245 bool WriteDexFile(OutputStream* out,
246 File* file,
247 OatDexFile* oat_dex_file,
248 ZipEntry* dex_file);
249 bool WriteDexFile(OutputStream* out,
250 File* file,
251 OatDexFile* oat_dex_file,
252 File* dex_file);
253 bool WriteDexFile(OutputStream* out, OatDexFile* oat_dex_file, const uint8_t* dex_file);
254 bool OpenDexFiles(File* file,
255 bool verify,
256 /*out*/ std::unique_ptr<MemMap>* opened_dex_files_map,
257 /*out*/ std::vector<std::unique_ptr<const DexFile>>* opened_dex_files);
258
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000259 size_t InitOatHeader(InstructionSet instruction_set,
260 const InstructionSetFeatures* instruction_set_features,
261 uint32_t num_dex_files,
262 SafeMap<std::string, std::string>* key_value_store);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700263 size_t InitOatDexFiles(size_t offset);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700264 size_t InitOatClasses(size_t offset);
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100265 size_t InitOatMaps(size_t offset);
Vladimir Marko49b0f452015-12-10 13:49:19 +0000266 size_t InitOatCode(size_t offset);
267 size_t InitOatCodeDexFiles(size_t offset);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700268
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000269 bool WriteClassOffsets(OutputStream* out);
270 bool WriteClasses(OutputStream* out);
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100271 size_t WriteMaps(OutputStream* out, const size_t file_offset, size_t relative_offset);
272 size_t WriteCode(OutputStream* out, const size_t file_offset, size_t relative_offset);
Ian Rogers3d504072014-03-01 09:16:49 -0800273 size_t WriteCodeDexFiles(OutputStream* out, const size_t file_offset, size_t relative_offset);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700274
Vladimir Marko944da602016-02-19 12:27:55 +0000275 bool RecordOatDataOffset(OutputStream* out);
David Brazdil7b49e6c2016-09-01 11:06:18 +0100276 bool ReadDexFileHeader(File* oat_file, OatDexFile* oat_dex_file);
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000277 bool ValidateDexFileHeader(const uint8_t* raw_header, const char* location);
David Brazdil7b49e6c2016-09-01 11:06:18 +0100278 bool WriteOatDexFiles(OutputStream* oat_rodata);
279 bool WriteTypeLookupTables(OutputStream* oat_rodata,
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000280 const std::vector<std::unique_ptr<const DexFile>>& opened_dex_files);
Vladimir Markof4da6752014-08-01 19:04:18 +0100281 bool WriteCodeAlignment(OutputStream* out, uint32_t aligned_code_delta);
Vladimir Marko944da602016-02-19 12:27:55 +0000282 void SetMultiOatRelativePatcherAdjustment();
Vladimir Markof4da6752014-08-01 19:04:18 +0100283
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000284 enum class WriteState {
285 kAddingDexFileSources,
286 kPrepareLayout,
287 kWriteRoData,
288 kWriteText,
289 kWriteHeader,
290 kDone
291 };
292
293 WriteState write_state_;
294 TimingLogger* timings_;
295
296 std::vector<std::unique_ptr<File>> raw_dex_files_;
297 std::vector<std::unique_ptr<ZipArchive>> zip_archives_;
298 std::vector<std::unique_ptr<ZipEntry>> zipped_dex_files_;
299
300 // Using std::list<> which doesn't move elements around on push/emplace_back().
301 // We need this because we keep plain pointers to the strings' c_str().
302 std::list<std::string> zipped_dex_file_locations_;
303
David Srbeckyc5bfa972016-02-05 15:49:10 +0000304 dchecked_vector<debug::MethodDebugInfo> method_info_;
Mark Mendellae9fd932014-02-10 16:14:35 -0800305
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000306 const CompilerDriver* compiler_driver_;
307 ImageWriter* image_writer_;
Mathieu Chartierda5b28a2015-11-05 08:03:47 -0800308 const bool compiling_boot_image_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700309
310 // note OatFile does not take ownership of the DexFiles
311 const std::vector<const DexFile*>* dex_files_;
312
David Brazdil7b49e6c2016-09-01 11:06:18 +0100313 // Size required for Vdex data structures.
314 size_t vdex_size_;
315
316 // Offset of section holding Dex files inside Vdex.
317 size_t vdex_dex_files_offset_;
318
David Brazdil5d5a36b2016-09-14 15:34:10 +0100319 // Offset of section holding VerifierDeps inside Vdex.
320 size_t vdex_verifier_deps_offset_;
321
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700322 // Size required for Oat data structures.
David Brazdil7b49e6c2016-09-01 11:06:18 +0100323 size_t oat_size_;
Brian Carlstromc50d8e12013-07-23 22:35:16 -0700324
Vladimir Marko5c42c292015-02-25 12:02:49 +0000325 // The size of the required .bss section holding the DexCache data.
326 size_t bss_size_;
327
Vladimir Marko09d09432015-09-08 13:47:48 +0100328 // Offsets of the dex cache arrays for each app dex file. For the
329 // boot image, this information is provided by the ImageWriter.
Vladimir Marko06d7aaa2015-10-16 11:23:41 +0100330 SafeMap<const DexFile*, size_t> dex_cache_arrays_offsets_; // DexFiles not owned.
Vladimir Marko09d09432015-09-08 13:47:48 +0100331
Vladimir Markof4da6752014-08-01 19:04:18 +0100332 // Offset of the oat data from the start of the mmapped region of the elf file.
333 size_t oat_data_offset_;
334
Brian Carlstrom7940e442013-07-12 13:46:57 -0700335 // data to write
Vladimir Marko49b0f452015-12-10 13:49:19 +0000336 std::unique_ptr<OatHeader> oat_header_;
337 dchecked_vector<OatDexFile> oat_dex_files_;
338 dchecked_vector<OatClass> oat_classes_;
Ian Rogers700a4022014-05-19 16:49:03 -0700339 std::unique_ptr<const std::vector<uint8_t>> jni_dlsym_lookup_;
Ian Rogers700a4022014-05-19 16:49:03 -0700340 std::unique_ptr<const std::vector<uint8_t>> quick_generic_jni_trampoline_;
341 std::unique_ptr<const std::vector<uint8_t>> quick_imt_conflict_trampoline_;
342 std::unique_ptr<const std::vector<uint8_t>> quick_resolution_trampoline_;
343 std::unique_ptr<const std::vector<uint8_t>> quick_to_interpreter_bridge_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700344
345 // output stats
David Brazdil7b49e6c2016-09-01 11:06:18 +0100346 uint32_t size_vdex_header_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700347 uint32_t size_dex_file_alignment_;
348 uint32_t size_executable_offset_alignment_;
349 uint32_t size_oat_header_;
Andreas Gampe22f8e5c2014-07-09 11:38:21 -0700350 uint32_t size_oat_header_key_value_store_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700351 uint32_t size_dex_file_;
David Brazdil5d5a36b2016-09-14 15:34:10 +0100352 uint32_t size_verifier_deps_;
353 uint32_t size_verifier_deps_alignment_;
Ian Rogers468532e2013-08-05 10:56:33 -0700354 uint32_t size_interpreter_to_interpreter_bridge_;
355 uint32_t size_interpreter_to_compiled_code_bridge_;
356 uint32_t size_jni_dlsym_lookup_;
Andreas Gampe2da88232014-02-27 12:26:20 -0800357 uint32_t size_quick_generic_jni_trampoline_;
Jeff Hao88474b42013-10-23 16:24:40 -0700358 uint32_t size_quick_imt_conflict_trampoline_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700359 uint32_t size_quick_resolution_trampoline_;
Ian Rogers468532e2013-08-05 10:56:33 -0700360 uint32_t size_quick_to_interpreter_bridge_;
361 uint32_t size_trampoline_alignment_;
Vladimir Marko96c6ab92014-04-08 14:00:50 +0100362 uint32_t size_method_header_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700363 uint32_t size_code_;
364 uint32_t size_code_alignment_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100365 uint32_t size_relative_call_thunks_;
Vladimir Markoc74658b2015-03-31 10:26:41 +0100366 uint32_t size_misc_thunks_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700367 uint32_t size_vmap_table_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700368 uint32_t size_oat_dex_file_location_size_;
369 uint32_t size_oat_dex_file_location_data_;
370 uint32_t size_oat_dex_file_location_checksum_;
371 uint32_t size_oat_dex_file_offset_;
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000372 uint32_t size_oat_dex_file_class_offsets_offset_;
Vladimir Marko49b0f452015-12-10 13:49:19 +0000373 uint32_t size_oat_dex_file_lookup_table_offset_;
Vladimir Marko49b0f452015-12-10 13:49:19 +0000374 uint32_t size_oat_lookup_table_alignment_;
375 uint32_t size_oat_lookup_table_;
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000376 uint32_t size_oat_class_offsets_alignment_;
377 uint32_t size_oat_class_offsets_;
Brian Carlstromba150c32013-08-27 17:31:03 -0700378 uint32_t size_oat_class_type_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700379 uint32_t size_oat_class_status_;
Brian Carlstromba150c32013-08-27 17:31:03 -0700380 uint32_t size_oat_class_method_bitmaps_;
Brian Carlstrom7940e442013-07-12 13:46:57 -0700381 uint32_t size_oat_class_method_offsets_;
382
Vladimir Marko944da602016-02-19 12:27:55 +0000383 // The helper for processing relative patches is external so that we can patch across oat files.
384 linker::MultiOatRelativePatcher* relative_patcher_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100385
David Srbeckyf8980872015-05-22 17:04:47 +0100386 // The locations of absolute patches relative to the start of the executable section.
Vladimir Marko9bdf1082016-01-21 12:15:52 +0000387 dchecked_vector<uintptr_t> absolute_patch_locations_;
Vladimir Markof4da6752014-08-01 19:04:18 +0100388
Brian Carlstrom7940e442013-07-12 13:46:57 -0700389 DISALLOW_COPY_AND_ASSIGN(OatWriter);
390};
391
392} // namespace art
393
Brian Carlstromfc0e3212013-07-17 14:40:12 -0700394#endif // ART_COMPILER_OAT_WRITER_H_