2022-11-03 22:57:51 -07:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
2023-03-07 16:59:14 -05:00
|
|
|
|
namespace BinaryObjectScanner.Models.MSDOS
|
2022-11-03 22:57:51 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Each pointer in the relocation table looks as such
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <see href="https://wiki.osdev.org/MZ"/>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
2022-12-27 17:12:55 -08:00
|
|
|
|
public sealed class RelocationEntry
|
2022-11-03 22:57:51 -07:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Offset of the relocation within provided segment.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ushort Offset;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Segment of the relocation, relative to the load segment address.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ushort Segment;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|