diff options
author | Igor Murashkin <iam@google.com> | 2014-10-22 11:37:02 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2014-10-27 20:19:37 -0700 |
commit | 46774767fcf7780d1455e755729198648d08742e (patch) | |
tree | 09a5d87ff0acbc7eb1fa94ec901ba10009178f03 /runtime/image.cc | |
parent | 11bd683f6dbebe2f3d02fa383fc9dbc69a83ace8 (diff) | |
download | art-46774767fcf7780d1455e755729198648d08742e.zip art-46774767fcf7780d1455e755729198648d08742e.tar.gz art-46774767fcf7780d1455e755729198648d08742e.tar.bz2 |
ART: Add support for patching and loading OAT files compiled with PIC
* Images (.art) compiled with pic now have a new field added.
* isDexOptNeeded will now skip patch-ing for apps compiled PIC
* First-boot patching now only copies boot.art, boot.oat is linked
As a result, all system preopted dex files (with --compile-pic) no
longer take up any space in /data/dalvik-cache/<isa>.
Bug: 18035729
Change-Id: Ie1acad81a0fd8b2f24e1f3f07a06e6fdb548be62
Diffstat (limited to 'runtime/image.cc')
-rw-r--r-- | runtime/image.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/image.cc b/runtime/image.cc index 2ee3fa4..40f4346 100644 --- a/runtime/image.cc +++ b/runtime/image.cc @@ -35,7 +35,8 @@ ImageHeader::ImageHeader(uint32_t image_begin, uint32_t oat_file_begin, uint32_t oat_data_begin, uint32_t oat_data_end, - uint32_t oat_file_end) + uint32_t oat_file_end, + bool compile_pic) : image_begin_(image_begin), image_size_(image_size), image_bitmap_offset_(image_bitmap_offset), @@ -46,7 +47,8 @@ ImageHeader::ImageHeader(uint32_t image_begin, oat_data_end_(oat_data_end), oat_file_end_(oat_file_end), patch_delta_(0), - image_roots_(image_roots) { + image_roots_(image_roots), + compile_pic_(compile_pic) { CHECK_EQ(image_begin, RoundUp(image_begin, kPageSize)); CHECK_EQ(oat_file_begin, RoundUp(oat_file_begin, kPageSize)); CHECK_EQ(oat_data_begin, RoundUp(oat_data_begin, kPageSize)); |