using System.Runtime.InteropServices; namespace BinaryObjectScanner.Models.NewExecutable { /// /// A table of relocation records follows. The following is the format /// of each relocation record. /// /// [StructLayout(LayoutKind.Sequential)] public sealed class RelocationRecord { /// /// Source type. /// public RelocationRecordSourceType SourceType; /// /// Flags byte. /// /// The target value has four types that are defined in the flag /// byte field. /// public RelocationRecordFlag Flags; /// /// Offset within this segment of the source chain. /// If the ADDITIVE flag is set, then target value is added to /// the source contents, instead of replacing the source and /// following the chain. The source chain is an 0FFFFh /// terminated linked list within this segment of all /// references to the target. /// public ushort Offset; /// /// INTERNALREF /// /// Must be NULL if is not set to public InternalRefRelocationRecord InternalRefRelocationRecord; /// /// IMPORTNAME /// /// Must be NULL if is not set to public ImportNameRelocationRecord ImportNameRelocationRecord; /// /// IMPORTORDINAL /// /// Must be NULL if is not set to public ImportOrdinalRelocationRecord ImportOrdinalRelocationRecord; /// /// IMPORTORDINAL /// /// Must be NULL if is not set to public OSFixupRelocationRecord OSFixupRelocationRecord; } }