From cf1fb9e17fc8b6ee849edab5a696d0ec5c6eadd2 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Fri, 23 Jun 2017 14:57:25 +0300 Subject: Remove relocations for MethodTable::m_pParentMethodTable for Linux ARM --- src/vm/class.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/vm/class.cpp') diff --git a/src/vm/class.cpp b/src/vm/class.cpp index c1519a2bfe..f1332f3650 100644 --- a/src/vm/class.cpp +++ b/src/vm/class.cpp @@ -889,7 +889,15 @@ ClassLoader::LoadExactParentAndInterfacesTransitively(MethodTable *pMT) LOG((LF_CLASSLOADER, LL_INFO1000, "GENERICS: Replaced approximate parent %s with exact parent %s from token %x\n", pParentMT->GetDebugClassName(), pNewParentMT->GetDebugClassName(), crExtends)); // SetParentMethodTable is not used here since we want to update the indirection cell in the NGen case - *EnsureWritablePages(pMT->GetParentMethodTablePtr()) = pNewParentMT; + if (pMT->GetParentMethodTablePlainOrRelativePointerPtr()->IsIndirectPtrMaybeNull()) + { + *EnsureWritablePages(pMT->GetParentMethodTablePlainOrRelativePointerPtr()->GetValuePtr()) = pNewParentMT; + } + else + { + EnsureWritablePages(pMT->GetParentMethodTablePlainOrRelativePointerPtr()); + pMT->GetParentMethodTablePlainOrRelativePointerPtr()->SetValueMaybeNull(pNewParentMT); + } pParentMT = pNewParentMT; } -- cgit v1.2.3