summaryrefslogtreecommitdiffstats
path: root/patchoat/patchoat.h
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2014-08-06 13:37:23 -0700
committerAlex Light <allight@google.com>2014-08-06 15:12:32 -0700
commit4b0d2d99b596eebd6da45679896d3af54bc5a935 (patch)
tree9c5f70398324b53edb47d1819648618f58ca24e4 /patchoat/patchoat.h
parent484e2c2d3531e5bb36f0e1e12f26c708939c6579 (diff)
downloadandroid_art-4b0d2d99b596eebd6da45679896d3af54bc5a935.tar.gz
android_art-4b0d2d99b596eebd6da45679896d3af54bc5a935.tar.bz2
android_art-4b0d2d99b596eebd6da45679896d3af54bc5a935.zip
Make patchoat use the sht_entsize when patching.
This fixes an occasional problem with multiarch use of patchoat. Change-Id: I80799de36774720bd985704f9b709a8378bb5af5
Diffstat (limited to 'patchoat/patchoat.h')
-rw-r--r--patchoat/patchoat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h
index 6960d3b446..326333eb7d 100644
--- a/patchoat/patchoat.h
+++ b/patchoat/patchoat.h
@@ -74,11 +74,12 @@ class PatchOat {
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
bool InHeap(mirror::Object*);
- bool CheckOatFile();
-
// Patches oat in place, modifying the oat_file given to the constructor.
bool PatchElf();
bool PatchTextSection();
+ // Templatized version to actually do the patching with the right sized offsets.
+ template <typename ptr_t> bool PatchTextSection(const Elf32_Shdr& patches_sec);
+ template <typename ptr_t> bool CheckOatFile(const Elf32_Shdr& patches_sec);
bool PatchOatHeader();
bool PatchSymbols(Elf32_Shdr* section);