summaryrefslogtreecommitdiff
path: root/src/ilasm
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2019-08-07 09:15:43 -0700
committerWilliam Godbe <wigodbe@microsoft.com>2019-08-07 09:15:43 -0700
commitb1efbdd7b6498cb92e1fce6927691764a1f06b55 (patch)
treea580e0ef5a98b45b56db1aeb70d894eecc360d33 /src/ilasm
parentb4a56b0339ff1eea904e1b8d3f89507552529d3b (diff)
downloadcoreclr-b1efbdd7b6498cb92e1fce6927691764a1f06b55.tar.gz
coreclr-b1efbdd7b6498cb92e1fce6927691764a1f06b55.tar.bz2
coreclr-b1efbdd7b6498cb92e1fce6927691764a1f06b55.zip
Fixes Issue #20262 for CoreCLR 5.0 (#25926) (#25988)
Disassembler: ildasm/dasm.cpp In the CoreCLR with reference assemblies and redirection it is more difficult to determine if a particular Assembly is the System assembly, like mscorlib.dll is for the Desktop CLR. In the CoreCLR runtimes, the System assembly can be System.Private.CoreLib.dll, System.Runtime.dll or netstandard.dll and in the future a different Assembly name could be used. We now determine the identity of the System assembly by querying if the Assembly defines the well known type System.Object as that type must be defined by the System assembly If this type is defined then we will output the ".mscorlib" directive to indicate that this assembly is the System assembly. Assembler: ilasm/assembler.cpp In Assembler:GetBaseAsmRef() add a check for System.Private.CoreLib as the System or Base assembly.
Diffstat (limited to 'src/ilasm')
-rw-r--r--src/ilasm/assembler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ilasm/assembler.cpp b/src/ilasm/assembler.cpp
index 38d83d083e..37158d6488 100644
--- a/src/ilasm/assembler.cpp
+++ b/src/ilasm/assembler.cpp
@@ -276,6 +276,14 @@ mdToken Assembler::GetAsmRef(__in __nullterminated const char* szName)
mdToken Assembler::GetBaseAsmRef()
{
+ // First we check for "System.Private.CoreLib" as the base or System assembly
+ //
+ AsmManAssembly* coreLibAsm = m_pManifest->GetAsmRefByAsmName("System.Private.CoreLib");
+ if(coreLibAsm != NULL)
+ {
+ return GetAsmRef(coreLibAsm->szAlias ? coreLibAsm->szAlias : coreLibAsm->szName);
+ }
+
AsmManAssembly* sysRuntime = m_pManifest->GetAsmRefByAsmName("System.Runtime");
if(sysRuntime != NULL)
{