From 40c68c690546e8c15dcb2de6137e72c74f573a75 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 23 Mar 2016 16:35:51 +0000 Subject: Fix dex2oat/oatdump cross-compilation. Only set the ImtConflictTable when not in AOT, to not mess up with the image. Change-Id: I8f2926ad30dc913d61b0c8957affc25fc8056ada --- runtime/runtime.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/runtime.cc') diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 941217f24d..512e8b8253 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1606,8 +1606,8 @@ ArtMethod* Runtime::CreateImtConflictMethod(LinearAlloc* linear_alloc) { method->SetEntryPointFromQuickCompiledCodePtrSize(nullptr, pointer_size); } else { method->SetEntryPointFromQuickCompiledCode(GetQuickImtConflictStub()); + method->SetImtConflictTable(reinterpret_cast(&empty_entry)); } - method->SetImtConflictTable(reinterpret_cast(&empty_entry)); return method; } @@ -1615,7 +1615,9 @@ void Runtime::SetImtConflictMethod(ArtMethod* method) { CHECK(method != nullptr); CHECK(method->IsRuntimeMethod()); imt_conflict_method_ = method; - method->SetImtConflictTable(reinterpret_cast(&empty_entry)); + if (!IsAotCompiler()) { + method->SetImtConflictTable(reinterpret_cast(&empty_entry)); + } } ArtMethod* Runtime::CreateResolutionMethod() { @@ -1933,7 +1935,9 @@ void Runtime::SetImtUnimplementedMethod(ArtMethod* method) { CHECK(method != nullptr); CHECK(method->IsRuntimeMethod()); imt_unimplemented_method_ = method; - method->SetImtConflictTable(reinterpret_cast(&empty_entry)); + if (!IsAotCompiler()) { + method->SetImtConflictTable(reinterpret_cast(&empty_entry)); + } } bool Runtime::IsVerificationEnabled() const { -- cgit v1.2.3