Fix dex2oat/oatdump cross-compilation.
Only set the ImtConflictTable when not in AOT, to not mess up
with the image.
Change-Id: I8f2926ad30dc913d61b0c8957affc25fc8056ada
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 941217f..512e8b8 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1606,8 +1606,8 @@
method->SetEntryPointFromQuickCompiledCodePtrSize(nullptr, pointer_size);
} else {
method->SetEntryPointFromQuickCompiledCode(GetQuickImtConflictStub());
+ method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
}
- method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
return method;
}
@@ -1615,7 +1615,9 @@
CHECK(method != nullptr);
CHECK(method->IsRuntimeMethod());
imt_conflict_method_ = method;
- method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
+ if (!IsAotCompiler()) {
+ method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
+ }
}
ArtMethod* Runtime::CreateResolutionMethod() {
@@ -1933,7 +1935,9 @@
CHECK(method != nullptr);
CHECK(method->IsRuntimeMethod());
imt_unimplemented_method_ = method;
- method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
+ if (!IsAotCompiler()) {
+ method->SetImtConflictTable(reinterpret_cast<ImtConflictTable*>(&empty_entry));
+ }
}
bool Runtime::IsVerificationEnabled() const {