Skip to content
/ coreclr Public
forked from dotnet/coreclr

.NET Core CLR; diverse support and modifications like 3F's IL Assembler on coreclr etc.

License

Notifications You must be signed in to change notification settings

3F/coreclr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status License

.NET Core complete runtime implementation. Also includes IL Assembler, IL Disassembler, RyuJIT, the .NET GC, native interop and many other components.

Some of these components have been modified and also known as 3F's IL Assembler on coreclr (github/3F) specialy for https://github.com/3F/DllExport and for other related purposes.

Licensed under the MIT License (MIT)

Copyright (c) .NET Foundation and Contributors
Copyright (c) 2016-2025  Denis Kuzmin <x-3F@outlook.com> github/3F

ILAsm on coreclr

3F's IL Assembler (ILAsm) + IL Disassembler (ILDasm) https://github.com/3F/coreclr

gntILAsm [?] NuGet package release

/REBASE

Rebase system object in order netstandard > System.Runtime > mscorlib is available starting from 4.700.2+

.typeref custom definitions

Starting from 9.3.0+ you can change the binding of any type for specific assemblies using the following .typeref directive:

grammar:

assemblyDecl : '.hash' 'algorithm' int32 
            | secDecl
            | asmOrRefDecl
            | '.typeref' dottedName 'at' dottedName 
            | '.typeref' dottedName 'any' 'at' dottedName 
            | '.typeref' dottedName 'constraint' 'deny' 
            | '.typeref' dottedName 'constraint' 'any' 'deny' 
            ;

The format for changing the link:

.typeref 'Type' [any] at 'ResolutionScope'

The format for rejecting defined records (predefined by the user and the assembler):

.typeref 'Type' constraint [any] deny

Note keyword any points to multiple definitions starting from the specified Name

For example, predefined assembler's .typeref directives (when /REB is activated) will mean something like:

// 9.3.0+
.assembly 'ClassLibrary1'
{
    .typeref 'System.' any at 'mscorlib'
    .typeref 'System' at 'mscorlib'
    .typeref 'System.Span`' constraint any deny
    
    .custom instance void ...
    .custom instance void ...
    .hash algorithm 0x00008004
    .ver 1:0:0:0
}

Multiple definitions are competitive or interchangeable. Priority is given to the last from top to bottom. For example,

.typeref 'System.' any at 'System.Runtime'
.typeref 'System.Math' constraint deny
.typeref 'System.IO.' constraint any deny
.typeref 'System.' any at 'mscorlib'

are equal to

.typeref 'System.' any at 'mscorlib'

etc.

/CVRES

.res / .obj

In order to provide a compatible resource converter to obj COFF-format when assembling, use /CVRES (/CVR) key:

ilasm ... /CVR=cvtres.exe

Automatic search for resource converter

Automatic search is available starting from 9.3.0+ by using hMSBuild to resolve .res / .obj processing automatically.

NuGet Package Preferences

  • $(ILAsm_RootPkg) - path to ILAsm package folder.
  • $(ILAsm_PathToBin) - path to \bin folder., e.g. $(ILAsm_PathToBin)Win.x64\ilasm.exe

PDB files are available through GitHub Releases: https://github.com/3F/coreclr/releases

About

.NET Core CLR; diverse support and modifications like 3F's IL Assembler on coreclr etc.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages

  • C# 64.7%
  • C++ 23.2%
  • C 10.1%
  • Python 0.4%
  • Assembly 0.4%
  • Roff 0.3%
  • Other 0.9%