using System.Runtime.InteropServices; namespace BurnOutSharp.Models.LinearExecutable { /// /// The object table contains information that describes each segment in /// an executable file. This information includes segment length, segment /// type, and segment-relocation data. The following list summarizes the /// values found in in the segment table (the locations are relative to /// the beginning of each entry): /// /// /// Entries in the Object Table are numbered starting from one. /// /// /// [StructLayout(LayoutKind.Sequential)] public class ObjectTableEntry { /// /// Virtual memory size. /// /// /// This is the size of the object that will be allocated when the object /// is loaded. The object's virtual size (rounded up to the page size value) /// must be greater than or equal to the total size of the pages in the EXE /// file for the object. This memory size must also be large enough to /// contain all of the iterated data and uninitialized data in the EXE file. /// public uint VirtualSegmentSize; /// /// Relocation Base Address. /// /// /// The relocation base address the object is currently relocated to. If the /// internal relocation fixups for the module have been removed, this is the /// address the object will be allocated at by the loader. /// public uint RelocationBaseAddress; /// /// Flag bits for the object. /// public ObjectFlags ObjectFlags; /// /// Object Page Table Index. /// /// /// This specifies the number of the first object page table entry for this object. /// The object page table specifies where in the EXE file a page can be found for /// a given object and specifies per-page attributes. /// /// The object table entries are ordered by logical page in the object table. In /// other words the object table entries are sorted based on the object page table /// index value. /// public uint PageTableIndex; /// /// # of object page table entries for this object. /// /// /// Any logical pages at the end of an object that do not have an entry in the object /// page table associated with them are handled as zero filled or invalid pages by /// the loader. /// /// When the last logical pages of an object are not specified with an object page /// table entry, they are treated as either zero filled pages or invalid pages based /// on the last entry in the object page table for that object. If the last entry /// was neither a zero filled or invalid page, then the additional pages are treated /// as zero filled pages. /// public uint PageTableEntries; /// /// Reserved for future use. Must be set to zero. /// public uint Reserved; } }