Class NativeMethodBodySerializer
- Namespace
- AsmResolver.DotNet.Code.Native
- Assembly
- AsmResolver.DotNet.dll
Provides an implementation for the IMethodBodySerializer that serializes method bodies written in a native and unmanaged language.
public class NativeMethodBodySerializer : IMethodBodySerializer
- Inheritance
-
NativeMethodBodySerializer
- Implements
- Inherited Members
Methods
AddBaseRelocations(ISegment, INativeSymbolsProvider, AddressFixup)
Registers base relocations for the provided address fixup, if required.
protected virtual void AddBaseRelocations(ISegment segment, INativeSymbolsProvider provider, AddressFixup fixup)
Parameters
segmentISegmentThe code segment that is being constructed.
providerINativeSymbolsProviderThe object responsible for providing symbols referenced by the native method body.
fixupAddressFixupThe fixup to build base relocations for.
FinalizeSymbol(ISegment, INativeSymbolsProvider, ISymbol)
Ensures the right symbol is used within the method body.
protected virtual ISymbol FinalizeSymbol(ISegment result, INativeSymbolsProvider provider, ISymbol symbol)
Parameters
resultISegmentThe code segment that is being constructed.
providerINativeSymbolsProviderThe object responsible for providing symbols referenced by the native method body.
symbolISymbolThe symbol to reference.
Returns
- ISymbol
The symbol.
SerializeMethodBody(MethodBodySerializationContext, MethodDefinition)
Serializes the body of the provided method definition into a segment that can be added to a PE image.
public ISegmentReference SerializeMethodBody(MethodBodySerializationContext context, MethodDefinition method)
Parameters
contextMethodBodySerializationContextThe context in which the serializer is situated in.
methodMethodDefinitionThe method to serialize the method body for.
Returns
- ISegmentReference
A reference to a segment that encodes the method body.