summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-11-09 11:16:49 -0800
committer Mathieu Chartier <mathieuc@google.com> 2016-01-22 15:01:55 -0800
commitf7fd970244f143b1abb956e29794c446e4d57f46 (patch)
treeaac1f57ac70747957f609bb46305dfeca87645a1 /patchoat/patchoat.cc
parent95005291d8ebdd1d2ac58ffc5181fef4fbbf2383 (diff)
Load app images
Support in-place patching of the app image based on boot image location and app oat location. Only loads for art run test so far since we do not automatically generate app images for app installs. N5 maps launch time (~200 runs): Before: 930ms After: 878.18ms After + image class table: 864.57ms TODO: Oatdump support. Store class loaders as class roots in image. Bug: 22858531 Change-Id: I9cbc645645e62ea2ed1ad8e139e91af7d88514c1
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r--patchoat/patchoat.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index d836532ed2..7e4ce917db 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -547,6 +547,9 @@ void PatchOat::PatchInternedStrings(const ImageHeader* image_header) {
void PatchOat::PatchClassTable(const ImageHeader* image_header) {
const auto& section = image_header->GetImageSection(ImageHeader::kSectionClassTable);
+ if (section.Size() == 0) {
+ return;
+ }
// Note that we require that ReadFromMemory does not make an internal copy of the elements.
// This also relies on visit roots not doing any verification which could fail after we update
// the roots to be the image addresses.