From 53cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3c Mon Sep 17 00:00:00 2001 From: Alex Light Date: Thu, 12 Jun 2014 11:26:29 -0700 Subject: Add patchoat tool to Art. Add a new executable called patchoat to art. This tool takes already compiled images and oat files and changes their base address, acting as a cheap form of relocation. Add a --include-patch-information flag to dex2oat and code to add required patch information to oat files created with the quick compiler. Bug: 15358152 Change-Id: Ie0c580db45bb14ec180deb84930def6c3628d97d --- compiler/image_writer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/image_writer.h') diff --git a/compiler/image_writer.h b/compiler/image_writer.h index aff155affc..2bcb41e3fe 100644 --- a/compiler/image_writer.h +++ b/compiler/image_writer.h @@ -150,9 +150,10 @@ class ImageWriter { SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); // Patches references in OatFile to expect runtime addresses. - void PatchOatCodeAndMethods() + void PatchOatCodeAndMethods(File* elf_file) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); - void SetPatchLocation(const CompilerDriver::PatchInformation* patch, uint32_t value) + void SetPatchLocation(const CompilerDriver::PatchInformation* patch, uint32_t value, + uintptr_t* patched_location) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); const CompilerDriver& compiler_driver_; -- cgit v1.2.3-59-g8ed1b