5.5.0
This version brings rudimentary low-level .NET ReadyToRun (R2R) parsing and writing to AsmResolver, allowing you to locate and read native code of precompiled managed method bodies (see documentation). Additionally, basic Span<T>
support was added to primitives like IDataSource
and Utf8String
for newer .NET runtime targets (netstandard 2.1 and above), and some new convenience APIs were added. Finally, some bugfixes were implemented, increasing general stability of the library.
New Features
- Add support for low level .NET ReadyToRun assembly parsing (#294, #495). See documentation.
- Add basic
Span<T>
support forIDataSource
s andUtf8String
(#483, thanks @DaZombieKiller). - Add option to suppress .NET resource data deduplication (#492).
- Add
TypeDefinition::GetConstructor
,MethodDefinition::CreateConstructor
and similar (#480). - Add
ReferenceTable
primitive segment class, representing structures like VTables that can be directly used as a writableISegment
. - Add
BinaryStreamReader::RemainingLength
. - Reduce allocations of null
SegmentReference
s. - Add
netstandard2.1
target.
Bug Fixes
TypeReference::IsImportedInModule
now correctly takes its resolution scope into account (#497).- Type resolution now correctly first checks whether the resolution scope refers to the current assembly (7403692).
TypeNameParser
now correctly does not return fully imported types, but they can still be resolved using.Resolve()
(#497).MemberCloner
now correctly fixes cross-references to includedSystem.Type
arguments in Custom Attributes (#482, #493).- Fixed an issue where .NET resource data with a malformed header would crash the parser (#492).
- Fixed an issue where
ZeroesDataSource
would clear out too much data in the buffer provided toReadBytes
(thanks @DaZombieKiller) - Fixed an issue where
BitList
would incorrectly accept negative indices (#478). - Fixed an issue where duplicated members would not be added even when preserving metadata tokens (#478).
- Fixed an issue where members with manually assigned tokens would not be saved correctly when assembly had no backing .NET directory (#478)
- Fixed a race condition in the caching mechanism of assembly resolution (61b6ddf)
- Fixed a race condition in the caching mechanism of input file services (61b6ddf)
- Fixed an issue where string operands in IL pretty printed instructions were not escaped properly (6e039b9)
Minor Breaking Changes
- Remove
TlsCallbackCollection
, replaced withReferenceTable
. TlsDirectory::CallbackFunctions
is now of typeReferenceTable
.IDotNetDirectory::ManagedNativeHeader
is now of the more specific segment typeIManagedNativeHeader
.