Add PE COFF string table

This commit is contained in:
Matt Nadareski
2022-11-05 15:40:48 -07:00
parent f4d1ce5388
commit b5caf6dacf
2 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
namespace BurnOutSharp.Models.PortableExecutable
{
/// <summary>
/// Immediately following the COFF symbol table is the COFF string table. The
/// position of this table is found by taking the symbol table address in the
/// 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 class COFFStringTable
{
/// <summary>
/// At the beginning of the COFF string table are 4 bytes that contain the
/// total size (in bytes) of the rest of the string table. This size includes
/// the size field itself, so that the value in this location would be 4 if no
/// strings were present.
/// </summary>
public uint TotalSize;
/// <summary>
/// Following the size are null-terminated strings that are pointed to by symbols
/// in the COFF symbol table.
/// </summary>
public string[] Strings;
}
}

View File

@@ -41,6 +41,11 @@ namespace BurnOutSharp.Models.PortableExecutable
/// </summary>
public COFFSymbolTableEntry[] COFFSymbolTable { get; set; }
// TODO: Left off at "COFF String Table"
/// <summary>
/// COFF string table
/// </summary>
public COFFStringTable COFFStringTable { get; set; }
// TODO: Left off at "The Attribute Certificate Table (Image Only)"
}
}