Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElinor Fung <elfung@microsoft.com>2021-04-07 07:11:04 +0300
committerGitHub <noreply@github.com>2021-04-07 07:11:04 +0300
commitf6b344b64a367ad71df11782122716b2e616d88f (patch)
tree9e452003657cf2967a809fef840a50ec52e1b783 /src/coreclr/utilcode
parent52f986706dc96b4b146c6657e6bcce1f5d29cc55 (diff)
Remove IAssemblyName (and various fusion remnants) (#50755)
Diffstat (limited to 'src/coreclr/utilcode')
-rw-r--r--src/coreclr/utilcode/CMakeLists.txt1
-rw-r--r--src/coreclr/utilcode/peinformation.cpp98
2 files changed, 0 insertions, 99 deletions
diff --git a/src/coreclr/utilcode/CMakeLists.txt b/src/coreclr/utilcode/CMakeLists.txt
index 0f9606d9353..af1187a59b2 100644
--- a/src/coreclr/utilcode/CMakeLists.txt
+++ b/src/coreclr/utilcode/CMakeLists.txt
@@ -20,7 +20,6 @@ set(UTILCODE_COMMON_SOURCES
stgpooli.cpp
stgpoolreadonly.cpp
utsem.cpp
- peinformation.cpp
check.cpp
log.cpp
arraylist.cpp
diff --git a/src/coreclr/utilcode/peinformation.cpp b/src/coreclr/utilcode/peinformation.cpp
deleted file mode 100644
index 78e41b11196..00000000000
--- a/src/coreclr/utilcode/peinformation.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// --------------------------------------------------------------------------------
-// PEInformation.cpp
-//
-
-// --------------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include "utilcode.h"
-#include "peinformation.h"
-
-
-HRESULT TranslatePEToArchitectureType(CorPEKind CLRPeKind, DWORD dwImageType, PEKIND * pPeKind)
-{
- return TranslatePEToArchitectureType(CLRPeKind, dwImageType, 0, pPeKind);
-}
-
-HRESULT TranslatePEToArchitectureType(CorPEKind CLRPeKind, DWORD dwImageType, DWORD dwAssemblyFlags, PEKIND * pPeKind)
-{
- HRESULT hr = S_OK;
-
- _ASSERTE(pPeKind != NULL);
-
- if (CLRPeKind == peNot)
- { // Not a PE. Shouldn't ever get here.
- *pPeKind = peInvalid;
- hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
- goto Exit;
- }
- else if (IsAfPA_NoPlatform(dwAssemblyFlags))
- {
- *pPeKind = peNone;
- goto Exit;
- }
- else
- {
- if ((CLRPeKind & peILonly) &&
- !(CLRPeKind & pe32Plus) &&
- !(CLRPeKind & pe32BitRequired) &&
- (dwImageType == IMAGE_FILE_MACHINE_I386))
- {
- // Processor-agnostic (MSIL)
- *pPeKind = peMSIL;
- }
- else if (CLRPeKind & pe32Plus)
- {
- // 64-bit
-
- if (CLRPeKind & pe32BitRequired)
- {
- *pPeKind = peInvalid;
- hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
- goto Exit;
- }
-
- // Regardless of whether ILONLY is set or not, the architecture
- // is the machine type.
-
- if (dwImageType == IMAGE_FILE_MACHINE_IA64)
- {
- *pPeKind = peIA64;
- }
- else if (dwImageType == IMAGE_FILE_MACHINE_AMD64)
- {
- *pPeKind = peAMD64;
- }
- else
- { // We don't support other architectures
- *pPeKind = peInvalid;
- hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
- goto Exit;
- }
- }
- else
- {
- // 32-bit, non-agnostic
-
- if (dwImageType == IMAGE_FILE_MACHINE_I386)
- {
- *pPeKind = peI386;
- }
- else if (dwImageType == IMAGE_FILE_MACHINE_ARMNT)
- {
- *pPeKind = peARM;
- }
- else
- { // Not supported
- *pPeKind = peInvalid;
- hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
- goto Exit;
- }
- }
- }
-
-Exit:
- return hr;
-}