diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-08-08 11:28:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-08 11:28:27 -0700 |
commit | 7590378d8a00d7c29ade23fada2ce79f4495b889 (patch) | |
tree | 2f621550b98e22430354d815e9a261671cddf50b /src/vm/method.cpp | |
parent | 488d562052e61dde32ff0593835acc2713e9a0d1 (diff) | |
parent | 76a572a65026f277c5c42b25fcb01cce4625b10f (diff) | |
download | coreclr-7590378d8a00d7c29ade23fada2ce79f4495b889.tar.gz coreclr-7590378d8a00d7c29ade23fada2ce79f4495b889.tar.bz2 coreclr-7590378d8a00d7c29ade23fada2ce79f4495b889.zip |
Merge pull request #12168 from gbalykov/remove-relocations-readonly
Partially remove relocations from SECTION_Readonly
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 63777e8ac1..4bae82a61d 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -3341,14 +3341,7 @@ MethodDesc::Fixup( } } - if (decltype(InstantiatedMethodDesc::m_pPerInstInfo)::isRelative) - { - image->FixupRelativePointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); - } - else - { - image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo)); - } + image->FixupPlainOrRelativePointerField((InstantiatedMethodDesc*) this, &InstantiatedMethodDesc::m_pPerInstInfo); // Generic methods are dealt with specially to avoid encoding the formal method type parameters if (IsTypicalMethodDefinition()) @@ -3427,14 +3420,7 @@ MethodDesc::Fixup( NDirectMethodDesc *pNMD = (NDirectMethodDesc *)this; - if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative) - { - image->FixupRelativePointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); - } - else - { - image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData)); - } + image->FixupPlainOrRelativePointerField(pNMD, &NDirectMethodDesc::ndirect, &decltype(NDirectMethodDesc::ndirect)::m_pWriteableData); NDirectWriteableData *pWriteableData = pNMD->GetWriteableData(); NDirectImportThunkGlue *pImportThunkGlue = pNMD->GetNDirectImportThunkGlue(); |