mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-29 01:50:24 +00:00
Add PE base relocation table parsing and printing
This commit is contained in:
@@ -46,6 +46,6 @@
|
||||
/// in the Page RVA field for the block. This offset
|
||||
/// specifies where the base relocation is to be applied.
|
||||
/// </summary>
|
||||
public ushort[] TypeOffsetFieldEntries;
|
||||
public BaseRelocationTypeOffsetFieldEntry[] TypeOffsetFieldEntries;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace BurnOutSharp.Models.PortableExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// Type or Offset field entry is a WORD (2 bytes).
|
||||
/// </summary>
|
||||
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
|
||||
public class BaseRelocationTypeOffsetFieldEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Stored in the high 4 bits of the WORD, a value that indicates the type
|
||||
/// of base relocation to be applied. For more information, see <see cref="BaseRelocationTypes"/>
|
||||
/// </summary>
|
||||
public BaseRelocationTypes BaseRelocationType;
|
||||
|
||||
/// <summary>
|
||||
/// Stored in the remaining 12 bits of the WORD, an offset from the starting
|
||||
/// address that was specified in the Page RVA field for the block. This
|
||||
/// offset specifies where the base relocation is to be applied.
|
||||
/// </summary>
|
||||
public ushort Offset;
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,11 @@ namespace BurnOutSharp.Models.PortableExecutable
|
||||
// the object file contains managed code. The format of the metadata is not
|
||||
// documented, but can be handed to the CLR interfaces for handling metadata.
|
||||
|
||||
/// <summary>
|
||||
/// Base relocation table (.reloc)
|
||||
/// </summary>
|
||||
public BaseRelocationBlock[] BaseRelocationTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Debug table (.debug*)
|
||||
/// </summary>
|
||||
@@ -125,7 +130,6 @@ namespace BurnOutSharp.Models.PortableExecutable
|
||||
// - Delay Bound Import Address Table
|
||||
// - Delay Unload Import Address Table
|
||||
// - The .pdata Section [Multiple formats per entry]
|
||||
// - The .reloc Section (Image Only)
|
||||
// - The .tls Section
|
||||
// - TLS Callback Functions
|
||||
// - [The Load Configuration Structure (Image Only)]
|
||||
|
||||
Reference in New Issue
Block a user