diff options
author | gbalykov <g.balykov@samsung.com> | 2017-06-03 06:31:28 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-06-02 20:31:28 -0700 |
commit | fd3668c7c9b9f5d64b5e6d1edf8c55a307cd3c2d (patch) | |
tree | 4dfd969b9979a2e4794e0cff4c46a378343b993e /src/vm/method.cpp | |
parent | b47b138d595267315008885e6ac7e2f4322cc5a9 (diff) | |
download | coreclr-fd3668c7c9b9f5d64b5e6d1edf8c55a307cd3c2d.tar.gz coreclr-fd3668c7c9b9f5d64b5e6d1edf8c55a307cd3c2d.tar.bz2 coreclr-fd3668c7c9b9f5d64b5e6d1edf8c55a307cd3c2d.zip |
Remove relocations from SECTION_MethodDesc for ngened images for fields accessed from jit code for Linux ARM (#11963)
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index ca0ecc178d..241a0ccee0 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -3496,7 +3496,14 @@ MethodDesc::Fixup( } } - image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + if (decltype(InstantiatedMethodDesc::m_pPerInstInfo)::isRelative) + { + image->FixupRelativePointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + } + else + { + image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); + } // Generic methods are dealt with specially to avoid encoding the formal method type parameters if (IsTypicalMethodDefinition()) @@ -3575,7 +3582,14 @@ MethodDesc::Fixup( NDirectMethodDesc *pNMD = (NDirectMethodDesc *)this; - image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative) + { + image->FixupRelativePointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + } + else + { + image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); + } NDirectWriteableData *pWriteableData = pNMD->GetWriteableData(); NDirectImportThunkGlue *pImportThunkGlue = pNMD->GetNDirectImportThunkGlue(); |