Add tests for Thumb2RelativePatcher.
Also make the thumb2/arm64 thunk allocation precise instead
of eagerly allocating thunk space. This allows the calls to
use the maximum positive offset.
Change-Id: Ifa95b0bb00bd73eeab0c2905d21e2f3078f4b0a8
diff --git a/compiler/linker/relative_patcher.h b/compiler/linker/relative_patcher.h
index dbb18cc..7a78254 100644
--- a/compiler/linker/relative_patcher.h
+++ b/compiler/linker/relative_patcher.h
@@ -84,7 +84,8 @@
// Reserve space for relative call thunks if needed, return adjusted offset. After all methods
// of a class have been processed it's called one last time with compiled_method == nullptr.
- virtual uint32_t ReserveSpace(uint32_t offset, const CompiledMethod* compiled_method) = 0;
+ virtual uint32_t ReserveSpace(uint32_t offset, const CompiledMethod* compiled_method,
+ MethodReference method_ref) = 0;
// Write relative call thunks if needed, return adjusted offset.
virtual uint32_t WriteThunks(OutputStream* out, uint32_t offset) = 0;