diff options
author | danmosemsft <danmose@microsoft.com> | 2017-02-12 16:51:48 -0800 |
---|---|---|
committer | danmosemsft <danmose@microsoft.com> | 2017-02-12 17:00:53 -0800 |
commit | b9f410b7b85d3948aece3aa009885df244f11e41 (patch) | |
tree | 4adbb4ae045896b11f373794e79b572e26d2def1 /src/utilcode/peinformation.cpp | |
parent | 206b6a7efbc2e947eff900f448b86573b77ae392 (diff) | |
download | coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.gz coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.bz2 coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.zip |
Remove never defined FEATURE_FUSION
Diffstat (limited to 'src/utilcode/peinformation.cpp')
-rw-r--r-- | src/utilcode/peinformation.cpp | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/src/utilcode/peinformation.cpp b/src/utilcode/peinformation.cpp index 948948a4da..20a9fe18b0 100644 --- a/src/utilcode/peinformation.cpp +++ b/src/utilcode/peinformation.cpp @@ -11,100 +11,6 @@ #include "utilcode.h" #include "peinformation.h" -#if defined(FEATURE_FUSION) && !defined(DACCESS_COMPILE) - -extern BOOL g_fWow64Process; // Wow64 Process - -PEKIND GetCurrentRealProcessorPEKIND() -{ - PEKIND curProcessorPEKind = TargetNativePEKIND(); - -#ifdef _TARGET_X86_ - if (g_fWow64Process) - { - SYSTEM_INFO si = {0}; - - GetNativeSystemInfo(&si); - switch (si.wProcessorArchitecture) - { - case PROCESSOR_ARCHITECTURE_AMD64: - curProcessorPEKind = peAMD64; - break; - default: - _ASSERTE(FALSE); - curProcessorPEKind = peInvalid; - break; - } - } -#endif // _TARGET_X86_ - - return curProcessorPEKind; -} - -HRESULT RuntimeIsValidAssemblyOnThisPlatform_CheckProcessorArchitecture(PEKIND processorArchitecture, BOOL bForInstall) -{ - LIMITED_METHOD_CONTRACT; - - HRESULT hr = S_OK; - - // MSIL / legacy images always allowed - if (IsPEMSIL(processorArchitecture) || (processorArchitecture == peNone)) - { - goto Exit; - } - else if (IsPE32(processorArchitecture)) - { -#ifdef _TARGET_ARM_ - // ARM can use only native ones - if (processorArchitecture != TargetNativePEKIND()) - { - hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); - goto Exit; - } - -#else //!_TARGET_ARM_ - //ARM assemblies can be installed only on ARM - if (processorArchitecture == peARM) - { - hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); - goto Exit; - } -#endif //!_TARGET_ARM_ - - if (bForInstall) - { - goto Exit; - } - else - { - // won't allow bind to x86 while in 64 bit process. - if (!IsProcess32()) - { - hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); - } - goto Exit; - } - } - // 64 bit images must match processor type - else if(IsPE64(processorArchitecture)) - { - if (!IsProcess32() && (processorArchitecture == TargetNativePEKIND())) - { - goto Exit; - } - else if (bForInstall && (GetCurrentRealProcessorPEKIND() == processorArchitecture)) - { - goto Exit; - } - } - - // Everything else, fails match - hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); - -Exit: - return hr; -} -#endif // FEATURE_FUSION && !DACCESS_COMPILE HRESULT TranslatePEToArchitectureType(CorPEKind CLRPeKind, DWORD dwImageType, PEKIND * pPeKind) { |