mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-04 05:36:12 +00:00
LinearExecutable model cleanup
This commit is contained in:
@@ -18,4 +18,4 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
|
||||
public const ushort LXSignatureUInt16 = 0x584c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/// fixup references to the entry points within this module. Not all entry points
|
||||
/// in the entry table will be exported, some entry points will only be used
|
||||
/// within the module. An ordinal number is used to index into the entry table.
|
||||
/// The entry table entries are numbered starting from one.
|
||||
///
|
||||
/// The entry table entries are numbered starting from one.
|
||||
///
|
||||
/// The list of entries are compressed into 'bundles', where possible. The entries
|
||||
/// within each bundle are all the same size. A bundle starts with a count field
|
||||
/// which indicates the number of entries in the bundle. The count is followed by
|
||||
@@ -22,12 +22,12 @@
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is the number of entries in this bundle.
|
||||
///
|
||||
///
|
||||
/// A zero value for the number of entries identifies the end of the
|
||||
/// entry table. There is no further bundle information when the number
|
||||
/// of entries is zero. In other words the entry table is terminated by
|
||||
/// a single zero byte.
|
||||
///
|
||||
///
|
||||
/// For <see cref="BundleType.UnusedEntry"/>, this is the number of unused
|
||||
/// entries to skip.
|
||||
/// For <see cref="BundleType.SixteenBitEntry"/>, this is the number of 16-bit
|
||||
@@ -51,6 +51,6 @@
|
||||
/// <summary>
|
||||
/// Table entries in the bundle
|
||||
/// </summary>
|
||||
public EntryTableEntry[]? TableEntries { get; set; }
|
||||
public EntryTableEntry[] TableEntries { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,19 +136,19 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// If the FLAGS field indicates import by ordinal, then this field is the
|
||||
/// ordinal number into the Entry Table of the target module, otherwise this
|
||||
/// field is the offset into the Procedure Names Table of the target module.
|
||||
///
|
||||
///
|
||||
/// A Forwarder entry (type = 4) is an entry point whose value is an imported
|
||||
/// reference. When a load time fixup occurs whose target is a forwarder, the
|
||||
/// loader obtains the address imported by the forwarder and uses that imported
|
||||
/// address to resolve the fixup.
|
||||
///
|
||||
///
|
||||
/// A forwarder may refer to an entry point in another module which is itself a
|
||||
/// forwarder, so there can be a chain of forwarders. The loader will traverse
|
||||
/// the chain until it finds a non-forwarded entry point which terminates the
|
||||
/// chain, and use this to resolve the original fixup. Circular chains are
|
||||
/// detected by the loader and result in a load time error. A maximum of 1024
|
||||
/// forwarders is allowed in a chain; more than this results in a load time error.
|
||||
///
|
||||
///
|
||||
/// Forwarders are useful for merging and recombining API calls into different
|
||||
/// sets of libraries, while maintaining compatibility with applications. For
|
||||
/// example, if one wanted to combine MONCALLS, MOUCALLS, and VIOCALLS into a
|
||||
@@ -164,19 +164,19 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// If the FLAGS field indicates import by ordinal, then this field is the
|
||||
/// ordinal number into the Entry Table of the target module, otherwise this
|
||||
/// field is the offset into the Procedure Names Table of the target module.
|
||||
///
|
||||
///
|
||||
/// A Forwarder entry (type = 4) is an entry point whose value is an imported
|
||||
/// reference. When a load time fixup occurs whose target is a forwarder, the
|
||||
/// loader obtains the address imported by the forwarder and uses that imported
|
||||
/// address to resolve the fixup.
|
||||
///
|
||||
///
|
||||
/// A forwarder may refer to an entry point in another module which is itself a
|
||||
/// forwarder, so there can be a chain of forwarders. The loader will traverse
|
||||
/// the chain until it finds a non-forwarded entry point which terminates the
|
||||
/// chain, and use this to resolve the original fixup. Circular chains are
|
||||
/// detected by the loader and result in a load time error. A maximum of 1024
|
||||
/// forwarders is allowed in a chain; more than this results in a load time error.
|
||||
///
|
||||
///
|
||||
/// Forwarders are useful for merging and recombining API calls into different
|
||||
/// sets of libraries, while maintaining compatibility with applications. For
|
||||
/// example, if one wanted to combine MONCALLS, MOUCALLS, and VIOCALLS into a
|
||||
@@ -187,4 +187,4 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// The setting of this bit requires the EIP Object # and EIP fields
|
||||
/// to have valid values. If the EIP Object # and EIP fields are
|
||||
/// valid and this bit is NOT set, then Global Library Initialization
|
||||
/// is assumed. Setting this bit for an EXE file is invalid.
|
||||
/// is assumed. Setting this bit for an EXE file is invalid.
|
||||
/// </remarks>
|
||||
Initialization = 0x00000004,
|
||||
|
||||
@@ -370,14 +370,14 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
Reserved3 = 0x00000008,
|
||||
|
||||
/// <summary>
|
||||
/// Internal fixups for the module have been applied.
|
||||
/// Internal fixups for the module have been applied.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The setting of this bit in a Linear Executable Module indicates that
|
||||
/// each object of the module has a preferred load address specified in
|
||||
/// the Object Table Reloc Base Addr. If the module's objects can not be
|
||||
/// loaded at these preferred addresses, then the relocation records that
|
||||
/// have been retained in the file data will be applied.
|
||||
/// have been retained in the file data will be applied.
|
||||
/// </remarks>
|
||||
InternalFixupsApplied = 0x00000010,
|
||||
|
||||
@@ -432,7 +432,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <remarks>
|
||||
/// When the 'Module is not loadable' flag is set, it indicates that
|
||||
/// either errors were detected at link time or that the module is
|
||||
/// being incrementally linked and therefore can't be loaded.
|
||||
/// being incrementally linked and therefore can't be loaded.
|
||||
/// </remarks>
|
||||
ModuleNotLoadable = 0x00002000,
|
||||
|
||||
@@ -451,7 +451,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A module can not contain dynamic links to other modules that have
|
||||
/// the 'program module' type.
|
||||
/// the 'program module' type.
|
||||
/// </remarks>
|
||||
ProgramModule = 0x00000000,
|
||||
|
||||
@@ -482,7 +482,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// The setting of this bit requires the EIP Object # and EIP fields
|
||||
/// to have valid values. If the EIP Object # and EIP fields are
|
||||
/// valid and this bit is NOT set, then Global Library Termination
|
||||
/// is assumed. Setting this bit for an EXE file is invalid.
|
||||
/// is assumed. Setting this bit for an EXE file is invalid.
|
||||
/// </remarks>
|
||||
PerProcessLibraryTermination = 0x40000000,
|
||||
}
|
||||
@@ -508,7 +508,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
// The readable, writable and executable flags provide support for all possible
|
||||
// protections. In systems where all of these protections are not supported,
|
||||
// the loader will be responsible for making the appropriate protection match
|
||||
// for the system.
|
||||
// for the system.
|
||||
|
||||
/// <summary>
|
||||
/// Resource Object.
|
||||
@@ -576,7 +576,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
// this bit controls the setting of the Default bit in the segment
|
||||
// descriptor. (The Default bit, or D-bit, determines whether the default
|
||||
// word size is 32-bits or 16-bits. It also affects the interpretation of
|
||||
// the instruction stream.)
|
||||
// the instruction stream.)
|
||||
|
||||
/// <summary>
|
||||
/// Object is conforming for code (80x86 Specific).
|
||||
@@ -621,7 +621,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
public enum OperatingSystem : ushort
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown (any "new-format" OS)
|
||||
/// Unknown (any "new-format" OS)
|
||||
/// </summary>
|
||||
Unknown = 0x00,
|
||||
|
||||
|
||||
@@ -13,39 +13,39 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// MS-DOS executable stub
|
||||
/// </summary>
|
||||
public MSDOS.Executable? Stub { get; set; }
|
||||
public MSDOS.Executable Stub { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information block
|
||||
/// </summary>
|
||||
public InformationBlock? InformationBlock { get; set; }
|
||||
public InformationBlock InformationBlock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Object table
|
||||
/// </summary>
|
||||
public ObjectTableEntry[]? ObjectTable { get; set; }
|
||||
public ObjectTableEntry[] ObjectTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Object page map
|
||||
/// </summary>
|
||||
public ObjectPageMapEntry[]? ObjectPageMap { get; set; }
|
||||
public ObjectPageMapEntry[] ObjectPageMap { get; set; }
|
||||
|
||||
// TODO: Object iterate data map table (Undefined)
|
||||
|
||||
/// <summary>
|
||||
/// Resource table
|
||||
/// </summary>
|
||||
public ResourceTableEntry[]? ResourceTable { get; set; }
|
||||
public ResourceTableEntry[] ResourceTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Resident Name table
|
||||
/// </summary>
|
||||
public ResidentNamesTableEntry[]? ResidentNamesTable { get; set; }
|
||||
public ResidentNamesTableEntry[] ResidentNamesTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entry table
|
||||
/// </summary>
|
||||
public EntryTableBundle[]? EntryTable { get; set; }
|
||||
public EntryTableBundle[] EntryTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Module format directives table (optional)
|
||||
@@ -60,32 +60,32 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// Fix-up page table
|
||||
/// </summary>
|
||||
public FixupPageTableEntry[]? FixupPageTable { get; set; }
|
||||
public FixupPageTableEntry[] FixupPageTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Fix-up record table
|
||||
/// </summary>
|
||||
public FixupRecordTableEntry[]? FixupRecordTable { get; set; }
|
||||
public FixupRecordTableEntry[] FixupRecordTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Import module name table
|
||||
/// </summary>
|
||||
public ImportModuleNameTableEntry[]? ImportModuleNameTable { get; set; }
|
||||
public ImportModuleNameTableEntry[] ImportModuleNameTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Import procedure name table
|
||||
/// </summary>
|
||||
public ImportModuleProcedureNameTableEntry[]? ImportModuleProcedureNameTable { get; set; }
|
||||
public ImportModuleProcedureNameTableEntry[] ImportModuleProcedureNameTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Per-Page checksum table
|
||||
/// </summary>
|
||||
public PerPageChecksumTableEntry[]? PerPageChecksumTable { get; set; }
|
||||
public PerPageChecksumTableEntry[] PerPageChecksumTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Non-Resident Name table
|
||||
/// </summary>
|
||||
public NonResidentNamesTableEntry[]? NonResidentNamesTable { get; set; }
|
||||
public NonResidentNamesTableEntry[] NonResidentNamesTable { get; set; }
|
||||
|
||||
// TODO: Non-resident directives data (Undefined)
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// The Fixup Page Table provides a simple mapping of a logical page number
|
||||
/// to an offset into the Fixup Record Table for that page.
|
||||
///
|
||||
///
|
||||
/// This table is parallel to the Object Page Table, except that there is
|
||||
/// one additional entry in this table to indicate the end of the Fixup
|
||||
/// Record Table.
|
||||
///
|
||||
///
|
||||
/// The fixup records are kept in order by logical page in the fixup record
|
||||
/// table. This allows the end of each page's fixup records is defined by the
|
||||
/// offset for the next logical page's fixup records. This last entry provides
|
||||
/// support of this mechanism for the last page in the fixup page table.
|
||||
/// support of this mechanism for the last page in the fixup page table.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
@@ -27,7 +27,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <remarks>
|
||||
/// This field specifies the offset, from the beginning of the fixup record
|
||||
/// table, to the first fixup record for this page. (1 to n)
|
||||
///
|
||||
///
|
||||
/// This field specifies the offset following the last fixup record in the
|
||||
/// fixup record table. This is the last entry in the fixup page table. (n + 1)
|
||||
/// </remarks>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/// entries in the source offset list. Otherwise, this is the single source
|
||||
/// offset for the fixup. Source offsets are relative to the beginning of
|
||||
/// the page where the fixup is to be made.
|
||||
///
|
||||
///
|
||||
/// Note that for fixups that cross page boundaries, a separate fixup record
|
||||
/// is specified for each page. An offset is still used for the 2nd page but
|
||||
/// it now becomes a negative offset since the fixup originated on the
|
||||
@@ -68,7 +68,7 @@
|
||||
/// entries in the source offset list. Otherwise, this is the single source
|
||||
/// offset for the fixup. Source offsets are relative to the beginning of
|
||||
/// the page where the fixup is to be made.
|
||||
///
|
||||
///
|
||||
/// Note that for fixups that cross page boundaries, a separate fixup record
|
||||
/// is specified for each page. An offset is still used for the 2nd page but
|
||||
/// it now becomes a negative offset since the fixup originated on the
|
||||
@@ -208,7 +208,7 @@
|
||||
/// <remarks>
|
||||
/// This field is an offset into the Import Procedure Name Table. It is
|
||||
/// a Word value when the '32-bit Target Offset Flag' bit in the target
|
||||
/// flags field is clear and a Dword value when the bit is set.
|
||||
/// flags field is clear and a Dword value when the bit is set.
|
||||
/// </remarks>
|
||||
public uint OffsetImportProcedureNameTableDWORD { get; set; }
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
/// <remarks>
|
||||
/// This field is an offset into the Import Procedure Name Table. It is
|
||||
/// a Word value when the '32-bit Target Offset Flag' bit in the target
|
||||
/// flags field is clear and a Dword value when the bit is set.
|
||||
/// flags field is clear and a Dword value when the bit is set.
|
||||
/// </remarks>
|
||||
public ushort OffsetImportProcedureNameTableWORD { get; set; }
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
/// This is the imported procedure's ordinal number. It is a Byte value when the
|
||||
/// '8-bit Ordinal' bit in the target flags field is set. Otherwise it is a Word value
|
||||
/// when the '32-bit Target Offset Flag' bit in the target flags field is clear and a
|
||||
/// Dword value when the bit is set.
|
||||
/// Dword value when the bit is set.
|
||||
/// </remarks>
|
||||
public byte ImportedOrdinalNumberByte { get; set; }
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
/// This is the imported procedure's ordinal number. It is a Byte value when the
|
||||
/// '8-bit Ordinal' bit in the target flags field is set. Otherwise it is a Word value
|
||||
/// when the '32-bit Target Offset Flag' bit in the target flags field is clear and a
|
||||
/// Dword value when the bit is set.
|
||||
/// Dword value when the bit is set.
|
||||
/// </remarks>
|
||||
public uint ImportedOrdinalNumberDWORD { get; set; }
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
/// This is the imported procedure's ordinal number. It is a Byte value when the
|
||||
/// '8-bit Ordinal' bit in the target flags field is set. Otherwise it is a Word value
|
||||
/// when the '32-bit Target Offset Flag' bit in the target flags field is clear and a
|
||||
/// Dword value when the bit is set.
|
||||
/// Dword value when the bit is set.
|
||||
/// </remarks>
|
||||
public uint ImportedOrdinalNumberWORD { get; set; }
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
/// clear the fixup record does not contain this field and is immediately
|
||||
/// followed by the next fixup record (or by the source offset list for this
|
||||
/// fixup record).
|
||||
///
|
||||
///
|
||||
/// This value is added to the address derived from the target entry point.
|
||||
/// This field is a Word value when the '32-bit Additive Flag' bit in the
|
||||
/// target flags field is clear and a Dword value when the bit is set.
|
||||
@@ -330,7 +330,7 @@
|
||||
/// clear the fixup record does not contain this field and is immediately
|
||||
/// followed by the next fixup record (or by the source offset list for this
|
||||
/// fixup record).
|
||||
///
|
||||
///
|
||||
/// This value is added to the address derived from the target entry point.
|
||||
/// This field is a Word value when the '32-bit Additive Flag' bit in the
|
||||
/// target flags field is clear and a Dword value when the bit is set.
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
/// The import module name table defines the module name strings imported through
|
||||
/// dynamic link references. These strings are referenced through the imported
|
||||
/// relocation fixups.
|
||||
///
|
||||
///
|
||||
/// To determine the length of the import module name table subtract the import
|
||||
/// module name table offset from the import procedure name table offset. These
|
||||
/// values are located in the linear EXE header. The end of the import module
|
||||
/// name table is not terminated by a special character, it is followed directly
|
||||
/// by the import procedure name table.
|
||||
///
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and NOT NULL TERMINATED.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
@@ -33,6 +33,6 @@
|
||||
/// This is a variable length string with it's length defined in bytes by
|
||||
/// the LEN field. The string is case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// The import procedure name table defines the procedure name strings imported
|
||||
/// by this module through dynamic link references. These strings are referenced
|
||||
/// through the imported relocation fixups.
|
||||
///
|
||||
///
|
||||
/// To determine the length of the import procedure name table add the fixup
|
||||
/// section size to the fixup page table offset, this computes the offset to
|
||||
/// the end of the fixup section, then subtract the import procedure name table
|
||||
@@ -13,7 +13,7 @@
|
||||
/// pages section is aligned on a 'page size' boundary, padded space may exist
|
||||
/// between the last import name string and the first page in the data pages
|
||||
/// section. If this padded space exists it will be zero filled.
|
||||
///
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and NOT NULL TERMINATED.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
@@ -26,7 +26,7 @@
|
||||
/// <remarks>
|
||||
/// This defines the length of the string in bytes. The length of each
|
||||
/// ascii name string is limited to 127 characters.
|
||||
///
|
||||
///
|
||||
/// The high bit in the LEN field (bit 7) is defined as an Overload bit.
|
||||
/// This bit signifies that additional information is contained in the
|
||||
/// linear EXE module and will be used in the future for parameter type
|
||||
@@ -41,6 +41,6 @@
|
||||
/// This is a variable length string with it's length defined in bytes by
|
||||
/// the LEN field. The string is case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// file as a valid 32-bit Linear Executable Module Format.
|
||||
/// </remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]
|
||||
public string? Signature;
|
||||
public string Signature;
|
||||
|
||||
/// <summary>
|
||||
/// Byte Ordering.
|
||||
/// Byte Ordering.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This byte specifies the byte ordering for the linear EXE format.
|
||||
@@ -53,7 +53,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// 32-bit linear EXE format. Each incompatible change to the linear EXE
|
||||
/// format must increment this value. This allows the system to recognized
|
||||
/// future EXE file versions so that an appropriate error message may be
|
||||
/// displayed if an attempt is made to load them.
|
||||
/// displayed if an attempt is made to load them.
|
||||
/// </remarks>
|
||||
public uint ExecutableFormatLevel;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is useful for differentiating between revisions of dynamic linked modules.
|
||||
/// This value is specified at link time by the user.
|
||||
/// This value is specified at link time by the user.
|
||||
/// </remarks>
|
||||
public uint ModuleVersion;
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// actually in the linear EXE file. These pages are contained in the 'preload
|
||||
/// pages', 'demand load pages' and 'iterated data pages' sections of the linear
|
||||
/// EXE module. This is used to determine the size of the page information tables
|
||||
/// in the linear EXE module.
|
||||
/// in the linear EXE module.
|
||||
/// </remarks>
|
||||
public uint ModuleNumberPages;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The Entry Address is the starting address for program modules and the library
|
||||
/// initialization and Library termination address for library modules.
|
||||
/// initialization and Library termination address for library modules.
|
||||
/// </remarks>
|
||||
public uint InitialEIP;
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <remarks>
|
||||
/// This specifies the object to which the starting ESP is relative. This must be a
|
||||
/// nonzero value for a program module to be correctly loaded. This field is ignored
|
||||
/// for a library module.
|
||||
/// for a library module.
|
||||
/// </remarks>
|
||||
public uint InitialObjectSS;
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <remarks>
|
||||
/// The ESP defines the starting stack pointer address for program modules. A zero
|
||||
/// value in this field indicates that the stack pointer is to be initialized to the
|
||||
/// highest address/offset in the object. This field is ignored for a library module.
|
||||
/// highest address/offset in the object. This field is ignored for a library module.
|
||||
/// </remarks>
|
||||
public uint InitialESP;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// translate a procedure name string into an ordinal number by searching for a
|
||||
/// matching name string. The ordinal number is used to locate the entry point
|
||||
/// information in the entry table.
|
||||
///
|
||||
///
|
||||
/// The resident name table is kept resident in system memory while the module is
|
||||
/// loaded.It is intended to contain the exported entry point names that are
|
||||
/// frequently dynamically linked to by name.Non-resident names are not kept in
|
||||
@@ -18,12 +18,12 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// or are commonly referenced by ordinal number should be placed in the
|
||||
/// non-resident name table.The trade off made for references by name is performance
|
||||
/// vs memory usage.
|
||||
///
|
||||
///
|
||||
/// Import references by name require these tables to be searched to obtain the entry
|
||||
/// point ordinal number.Import references by ordinal number provide the fastest
|
||||
/// lookup since the search of these tables is not required.
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and are NOT NULL TERMINATED.
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and are NOT NULL TERMINATED.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
@@ -37,7 +37,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// This defines the length of the string in bytes. A zero length indicates there are
|
||||
/// no more entries in table. The length of each ascii name string is limited to 127
|
||||
/// characters.
|
||||
///
|
||||
///
|
||||
/// The high bit in the LEN field (bit 7) is defined as an Overload bit. This bit
|
||||
/// signifies that additional information is contained in the linear EXE module and
|
||||
/// will be used in the future for parameter type checking.
|
||||
@@ -51,7 +51,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// This is a variable length string with it's length defined in bytes by the LEN field.
|
||||
/// The string is case case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number.
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// demand load page or iterated data page sections in the linear EXE module. The
|
||||
/// logical page entries in the Object Page Table are numbered starting from one.
|
||||
/// The Object Page Table is parallel to the Fixup Page Table as they are both
|
||||
/// indexed by the logical page number.
|
||||
/// indexed by the logical page number.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
@@ -27,16 +27,16 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// of the physical page data in the EXE file that corresponds to this logical
|
||||
/// page entry. The page data may reside in the Preload Pages, Demand Load Pages
|
||||
/// or the Iterated Data Pages sections.
|
||||
///
|
||||
///
|
||||
/// If the FLAGS field specifies that this is a zero-Filled page then the PAGE
|
||||
/// DATA OFFSET field will contain a 0.
|
||||
///
|
||||
///
|
||||
/// If the logical page is specified as an iterated data page, as indicated by
|
||||
/// the FLAGS field, then this field specifies the offset into the Iterated Data
|
||||
/// Pages section.
|
||||
///
|
||||
///
|
||||
/// The logical page number (Object Page Table index), is used to index the Fixup
|
||||
/// Page Table to find any fixups associated with the logical page.
|
||||
/// Page Table to find any fixups associated with the logical page.
|
||||
/// </remarks>
|
||||
public uint PageDataOffset;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// file. If the PAGE SIZE field from the module header is greater than the value
|
||||
/// of this field and the FLAGS field indicates a Legal Physical Page, the remaining
|
||||
/// bytes are to be filled with zeros. If the FLAGS field indicates an Iterated Data
|
||||
/// Page, the iterated data records will completely fill out the remainder.
|
||||
/// Page, the iterated data records will completely fill out the remainder.
|
||||
/// </remarks>
|
||||
public ushort DataSize;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// 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.
|
||||
/// contain all of the iterated data and uninitialized data in the EXE file.
|
||||
/// </remarks>
|
||||
public uint VirtualSegmentSize;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// 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.
|
||||
@@ -66,7 +66,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// 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
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace SabreTools.Data.Models.LinearExecutable
|
||||
/// <summary>
|
||||
/// The Per-Page Checksum table provides space for a cryptographic checksum for
|
||||
/// each physical page in the EXE file.
|
||||
///
|
||||
///
|
||||
/// The checksum table is arranged such that the first entry in the table corresponds
|
||||
/// to the first logical page of code/data in the EXE file (usually a preload page)
|
||||
/// and the last entry corresponds to the last logical page in the EXE file (usually
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/// translate a procedure name string into an ordinal number by searching for a
|
||||
/// matching name string. The ordinal number is used to locate the entry point
|
||||
/// information in the entry table.
|
||||
///
|
||||
///
|
||||
/// The resident name table is kept resident in system memory while the module is
|
||||
/// loaded. It is intended to contain the exported entry point names that are
|
||||
/// frequently dynamically linked to by name. Non-resident names are not kept in
|
||||
@@ -16,12 +16,12 @@
|
||||
/// or are commonly referenced by ordinal number should be placed in the
|
||||
/// non-resident name table. The trade off made for references by name is performance
|
||||
/// vs memory usage.
|
||||
///
|
||||
///
|
||||
/// Import references by name require these tables to be searched to obtain the entry
|
||||
/// point ordinal number.Import references by ordinal number provide the fastest
|
||||
/// lookup since the search of these tables is not required.
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and are NOT NULL TERMINATED.
|
||||
///
|
||||
/// The strings are CASE SENSITIVE and are NOT NULL TERMINATED.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
/// This defines the length of the string in bytes. A zero length indicates there are
|
||||
/// no more entries in table. The length of each ascii name string is limited to 127
|
||||
/// characters.
|
||||
///
|
||||
///
|
||||
/// The high bit in the LEN field (bit 7) is defined as an Overload bit. This bit
|
||||
/// signifies that additional information is contained in the linear EXE module and
|
||||
/// will be used in the future for parameter type checking.
|
||||
@@ -48,7 +48,7 @@
|
||||
/// This is a variable length string with it's length defined in bytes by the LEN field.
|
||||
/// The string is case case sensitive and is not null terminated.
|
||||
/// </remarks>
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ordinal number.
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
|
||||
// Stub
|
||||
Print(builder, Model.Stub?.Header);
|
||||
Print(builder, Model.Stub.Header);
|
||||
|
||||
// Information Block
|
||||
Print(builder, Model.InformationBlock);
|
||||
@@ -43,17 +43,10 @@ namespace SabreTools.Serialization.Wrappers
|
||||
Print(builder, Model.DebugInformation);
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, Data.Models.MSDOS.ExecutableHeader? header)
|
||||
private static void Print(StringBuilder builder, Data.Models.MSDOS.ExecutableHeader header)
|
||||
{
|
||||
builder.AppendLine(" MS-DOS Stub Header Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (header == null)
|
||||
{
|
||||
builder.AppendLine(" No MS-DOS stub header");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(header.Magic, " Magic number");
|
||||
builder.AppendLine(header.LastPageBytes, " Last page bytes");
|
||||
builder.AppendLine(header.Pages, " Pages");
|
||||
@@ -80,17 +73,10 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, InformationBlock? block)
|
||||
private static void Print(StringBuilder builder, InformationBlock block)
|
||||
{
|
||||
builder.AppendLine(" Information Block Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (block == null)
|
||||
{
|
||||
builder.AppendLine(" No information block");
|
||||
builder.AppendLine();
|
||||
return;
|
||||
}
|
||||
|
||||
builder.AppendLine(block.Signature, " Signature");
|
||||
builder.AppendLine($" Byte order: {block.ByteOrder} (0x{block.ByteOrder:X})");
|
||||
builder.AppendLine($" Word order: {block.WordOrder} (0x{block.WordOrder:X})");
|
||||
@@ -140,11 +126,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ObjectTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ObjectTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Object Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No object table entries");
|
||||
builder.AppendLine();
|
||||
@@ -167,11 +153,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ObjectPageMapEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ObjectPageMapEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Object Page Map Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No object page map entries");
|
||||
builder.AppendLine();
|
||||
@@ -191,11 +177,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ResourceTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ResourceTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Resource Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No resource table entries");
|
||||
builder.AppendLine();
|
||||
@@ -217,11 +203,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ResidentNamesTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ResidentNamesTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Resident Names Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No resident names table entries");
|
||||
builder.AppendLine();
|
||||
@@ -241,11 +227,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, EntryTableBundle[]? entries)
|
||||
private static void Print(StringBuilder builder, EntryTableBundle[] entries)
|
||||
{
|
||||
builder.AppendLine(" Entry Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No entry table bundles");
|
||||
builder.AppendLine();
|
||||
@@ -266,11 +252,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, EntryTableEntry[]? entries, BundleType type)
|
||||
private static void Print(StringBuilder builder, EntryTableEntry[] entries, BundleType type)
|
||||
{
|
||||
builder.AppendLine(" Entry Table Entries:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No entry table entries");
|
||||
builder.AppendLine();
|
||||
@@ -374,11 +360,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, FixupPageTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, FixupPageTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Fix-up Page Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No fix-up page table entries");
|
||||
builder.AppendLine();
|
||||
@@ -396,11 +382,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, FixupRecordTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, FixupRecordTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Fix-up Record Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No fix-up record table entries");
|
||||
builder.AppendLine();
|
||||
@@ -619,11 +605,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
}
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ImportModuleNameTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ImportModuleNameTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Import Module Name Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No import module name table entries");
|
||||
builder.AppendLine();
|
||||
@@ -642,11 +628,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, ImportModuleProcedureNameTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, ImportModuleProcedureNameTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Import Module Procedure Name Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No import module procedure name table entries");
|
||||
builder.AppendLine();
|
||||
@@ -665,11 +651,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, PerPageChecksumTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, PerPageChecksumTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Per-Page Checksum Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No per-page checksum table entries");
|
||||
builder.AppendLine();
|
||||
@@ -687,11 +673,11 @@ namespace SabreTools.Serialization.Wrappers
|
||||
builder.AppendLine();
|
||||
}
|
||||
|
||||
private static void Print(StringBuilder builder, NonResidentNamesTableEntry[]? entries)
|
||||
private static void Print(StringBuilder builder, NonResidentNamesTableEntry[] entries)
|
||||
{
|
||||
builder.AppendLine(" Non-Resident Names Table Information:");
|
||||
builder.AppendLine(" -------------------------");
|
||||
if (entries == null || entries.Length == 0)
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
builder.AppendLine(" No non-resident names table entries");
|
||||
builder.AppendLine();
|
||||
|
||||
Reference in New Issue
Block a user