diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-03-06 16:37:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 16:37:51 -0800 |
commit | 47bef69b68a35eafa069d08187727684a5f47901 (patch) | |
tree | 2fd0158bbc56718f43d0a9666c7223b7b2d94b9d /src/vm | |
parent | 964fa6861dab06933d3983671ce90c8bf96690f7 (diff) | |
download | coreclr-47bef69b68a35eafa069d08187727684a5f47901.tar.gz coreclr-47bef69b68a35eafa069d08187727684a5f47901.tar.bz2 coreclr-47bef69b68a35eafa069d08187727684a5f47901.zip |
Revert "Fix handling of incorrect assemblies on Unix (#16747)" (#16790)
This reverts commit 383736b96b643ba46ad290fc86601fc2d62a9436.
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/peimage.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vm/peimage.cpp b/src/vm/peimage.cpp index 83989f0e4d..3536b08361 100644 --- a/src/vm/peimage.cpp +++ b/src/vm/peimage.cpp @@ -1029,9 +1029,7 @@ PTR_PEImageLayout PEImage::CreateLayoutFlat(BOOL bPermitWriteableSections) PTR_PEImageLayout pFlatLayout = PEImageLayout::LoadFlat(GetFileHandle(),this); - if (!bPermitWriteableSections - && pFlatLayout->CheckNTHeaders() - && pFlatLayout->HasWriteableSections()) + if (!bPermitWriteableSections && pFlatLayout->HasWriteableSections()) { pFlatLayout->Release(); @@ -1116,7 +1114,8 @@ void PEImage::Load() #ifdef PLATFORM_UNIX if (m_pLayouts[IMAGE_FLAT] != NULL - && m_pLayouts[IMAGE_FLAT]->CheckILOnlyFormat() + && m_pLayouts[IMAGE_FLAT]->CheckFormat() + && m_pLayouts[IMAGE_FLAT]->IsILOnly() && !m_pLayouts[IMAGE_FLAT]->HasWriteableSections()) { // IL-only images with writeable sections are mapped in general way, |