Add LE object table

This commit is contained in:
Matt Nadareski
2022-11-04 12:59:50 -07:00
parent 1f5ab45a1e
commit f3710c575b
2 changed files with 52 additions and 1 deletions

View File

@@ -20,7 +20,11 @@ namespace BurnOutSharp.Models.LinearExecutable
/// </summary>
public InformationBlock InformationBlock { get; set; }
// TODO: Object table
/// <summary>
/// Object table
/// </summary>
public ObjectTableEntry[] ObjectTable { get; set; }
// TODO: Object page map table
// TODO: Object iterate data map table
// TODO: Resource table

View File

@@ -0,0 +1,47 @@
using System.Runtime.InteropServices;
namespace BurnOutSharp.Models.LinearExecutable
{
/// <summary>
/// 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):
/// </summary>
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
[StructLayout(LayoutKind.Sequential)]
public class ObjectTableEntry
{
/// <summary>
/// Virtual segment size in bytes
/// </summary>
public uint VirtualSegmentSize;
/// <summary>
/// Relocation base address
/// </summary>
public uint RelocationBaseAddress;
/// <summary>
/// Object flags
/// </summary>
/// <remarks>No flags are documented properly</remarks>
public uint ObjectFlags;
/// <summary>
/// Page map index
/// </summary>
public uint PageMapIndex;
/// <summary>
/// Page map entries
/// </summary>
public uint PageMapEntries;
/// <summary>
/// ???
/// </summary>
public uint Reserved;
}
}