From 33e3886802d95e7d4b5bfde630c0067d07c6291a Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Thu, 22 Jun 2017 20:39:03 +0300 Subject: Remove relocations for MethodTable::m_pWriteableData for Linux ARM --- src/vm/methodtable.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/vm/methodtable.h') diff --git a/src/vm/methodtable.h b/src/vm/methodtable.h index 92a61f4118..7bf5432ebc 100644 --- a/src/vm/methodtable.h +++ b/src/vm/methodtable.h @@ -3134,36 +3134,39 @@ public: // Private part of MethodTable // ------------------------------------------------------------------ +#ifndef DACCESS_COMPILE inline void SetWriteableData(PTR_MethodTableWriteableData pMTWriteableData) { LIMITED_METHOD_CONTRACT; _ASSERTE(pMTWriteableData); - m_pWriteableData = pMTWriteableData; + m_pWriteableData.SetValue(pMTWriteableData); } - +#endif + inline PTR_Const_MethodTableWriteableData GetWriteableData() const { LIMITED_METHOD_DAC_CONTRACT; g_IBCLogger.LogMethodTableWriteableDataAccess(this); - return m_pWriteableData; + return GetWriteableData_NoLogging(); } inline PTR_Const_MethodTableWriteableData GetWriteableData_NoLogging() const { LIMITED_METHOD_DAC_CONTRACT; - return m_pWriteableData; + return ReadPointer(this, &MethodTable::m_pWriteableData); } inline PTR_MethodTableWriteableData GetWriteableDataForWrite() { - LIMITED_METHOD_CONTRACT; + LIMITED_METHOD_DAC_CONTRACT; g_IBCLogger.LogMethodTableWriteableDataWriteAccess(this); - return m_pWriteableData; + return GetWriteableDataForWrite_NoLogging(); } inline PTR_MethodTableWriteableData GetWriteableDataForWrite_NoLogging() { - return m_pWriteableData; + LIMITED_METHOD_DAC_CONTRACT; + return ReadPointer(this, &MethodTable::m_pWriteableData); } //------------------------------------------------------------------- @@ -4061,7 +4064,11 @@ private: RelativePointer m_pLoaderModule; // LoaderModule. It is equal to the ZapModule in ngened images - PTR_MethodTableWriteableData m_pWriteableData; +#if defined(PLATFORM_UNIX) && defined(_TARGET_ARM_) + RelativePointer m_pWriteableData; +#else + PlainPointer m_pWriteableData; +#endif // The value of lowest two bits describe what the union contains enum LowBits { -- cgit v1.2.3