using System.Runtime.InteropServices; namespace SabreTools.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 #if NET48 public InternalRefRelocationRecord InternalRefRelocationRecord; #else public InternalRefRelocationRecord? InternalRefRelocationRecord; #endif /// /// IMPORTNAME /// /// Must be NULL if is not set to #if NET48 public ImportNameRelocationRecord ImportNameRelocationRecord; #else public ImportNameRelocationRecord? ImportNameRelocationRecord; #endif /// /// IMPORTORDINAL /// /// Must be NULL if is not set to #if NET48 public ImportOrdinalRelocationRecord ImportOrdinalRelocationRecord; #else public ImportOrdinalRelocationRecord? ImportOrdinalRelocationRecord; #endif /// /// IMPORTORDINAL /// /// Must be NULL if is not set to #if NET48 public OSFixupRelocationRecord OSFixupRelocationRecord; #else public OSFixupRelocationRecord? OSFixupRelocationRecord; #endif } }