Separate out COFF stuff maybe for later?

This commit is contained in:
Matt Nadareski
2025-09-22 11:26:08 -04:00
parent b5ac9304a4
commit eda099d44e
16 changed files with 1505 additions and 1501 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// At the beginning of an object file, or immediately after the signature
@@ -9,7 +9,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class COFFFileHeader
public sealed class FileHeader
{
/// <summary>
/// The number that identifies the type of target machine.

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// COFF line numbers are no longer produced and, in the future, will
@@ -17,7 +17,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Explicit)]
public sealed class COFFLineNumber
public sealed class LineNumber
{
/// <summary>
/// Used when Linenumber is zero: index to symbol table entry for a function.

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// Object files contain COFF relocations, which specify how the section data
@@ -18,7 +18,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class COFFRelocation
public sealed class Relocation
{
/// <summary>
/// The address of the item to which relocation is applied. This is the

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// Immediately following the COFF symbol table is the COFF string table. The
@@ -6,7 +6,7 @@
/// COFF header and adding the number of symbols multiplied by the size of a symbol.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class COFFStringTable
public sealed class StringTable
{
/// <summary>
/// At the beginning of the COFF string table are 4 bytes that contain the

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// The symbol table in this section is inherited from the traditional

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 6: CLR Token Definition (Object Only)

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 2: .bf and .ef Symbols

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 4: Files

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 1: Function Definitions

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 5: Section Definitions

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// A standard record defines a symbol or name.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 3: Weak Externals

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@ namespace SabreTools.Models.PortableExecutable
/// <summary>
/// COFF file header
/// </summary>
public COFFFileHeader? COFFFileHeader { get; set; }
public COFF.FileHeader? COFFFileHeader { get; set; }
/// <summary>
/// Optional header
@@ -45,12 +45,12 @@ namespace SabreTools.Models.PortableExecutable
/// <summary>
/// COFF symbol table
/// </summary>
public COFFSymbolTableEntries.BaseEntry[]? COFFSymbolTable { get; set; }
public COFF.SymbolTableEntries.BaseEntry[]? COFFSymbolTable { get; set; }
/// <summary>
/// COFF string table
/// </summary>
public COFFStringTable? COFFStringTable { get; set; }
public COFF.StringTable? COFFStringTable { get; set; }
/// <summary>
/// Attribute certificate table

View File

@@ -100,11 +100,11 @@
/// <summary>
/// COFF Relocations (Object Only)
/// </summary>
public COFFRelocation[]? COFFRelocations { get; set; }
public COFF.Relocation[]? COFFRelocations { get; set; }
/// <summary>
/// COFF Line Numbers (Deprecated)
/// </summary>
public COFFLineNumber[]? COFFLineNumbers { get; set; }
public COFF.LineNumber[]? COFFLineNumbers { get; set; }
}
}