From b5ac9304a4fb0150877e7435698dbdddf40f780a Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 22 Sep 2025 11:14:27 -0400 Subject: [PATCH] Move base relocation to new namespace --- .../{BaseRelocationBlock.cs => BaseRelocation/Block.cs} | 6 +++--- .../TypeOffsetFieldEntry.cs} | 4 ++-- SabreTools.Models/PortableExecutable/Executable.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename SabreTools.Models/PortableExecutable/{BaseRelocationBlock.cs => BaseRelocation/Block.cs} (93%) rename SabreTools.Models/PortableExecutable/{BaseRelocationTypeOffsetFieldEntry.cs => BaseRelocation/TypeOffsetFieldEntry.cs} (88%) diff --git a/SabreTools.Models/PortableExecutable/BaseRelocationBlock.cs b/SabreTools.Models/PortableExecutable/BaseRelocation/Block.cs similarity index 93% rename from SabreTools.Models/PortableExecutable/BaseRelocationBlock.cs rename to SabreTools.Models/PortableExecutable/BaseRelocation/Block.cs index 91a037d..be93374 100644 --- a/SabreTools.Models/PortableExecutable/BaseRelocationBlock.cs +++ b/SabreTools.Models/PortableExecutable/BaseRelocation/Block.cs @@ -1,4 +1,4 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.BaseRelocation { /// /// The base relocation table contains entries for all base relocations in @@ -18,7 +18,7 @@ /// relocations do not have to be applied. /// /// - public sealed class BaseRelocationBlock + public sealed class Block { /// /// The image base plus the page RVA is added to each offset to create @@ -46,6 +46,6 @@ /// in the Page RVA field for the block. This offset /// specifies where the base relocation is to be applied. /// - public BaseRelocationTypeOffsetFieldEntry[]? TypeOffsetFieldEntries { get; set; } + public TypeOffsetFieldEntry[]? TypeOffsetFieldEntries { get; set; } } } diff --git a/SabreTools.Models/PortableExecutable/BaseRelocationTypeOffsetFieldEntry.cs b/SabreTools.Models/PortableExecutable/BaseRelocation/TypeOffsetFieldEntry.cs similarity index 88% rename from SabreTools.Models/PortableExecutable/BaseRelocationTypeOffsetFieldEntry.cs rename to SabreTools.Models/PortableExecutable/BaseRelocation/TypeOffsetFieldEntry.cs index eef727e..8ec8554 100644 --- a/SabreTools.Models/PortableExecutable/BaseRelocationTypeOffsetFieldEntry.cs +++ b/SabreTools.Models/PortableExecutable/BaseRelocation/TypeOffsetFieldEntry.cs @@ -1,10 +1,10 @@ -namespace SabreTools.Models.PortableExecutable +namespace SabreTools.Models.PortableExecutable.BaseRelocation { /// /// Type or Offset field entry is a WORD (2 bytes). /// /// - public sealed class BaseRelocationTypeOffsetFieldEntry + public sealed class TypeOffsetFieldEntry { /// /// Stored in the high 4 bits of the WORD, a value that indicates the type diff --git a/SabreTools.Models/PortableExecutable/Executable.cs b/SabreTools.Models/PortableExecutable/Executable.cs index a3963b4..5814097 100644 --- a/SabreTools.Models/PortableExecutable/Executable.cs +++ b/SabreTools.Models/PortableExecutable/Executable.cs @@ -71,7 +71,7 @@ namespace SabreTools.Models.PortableExecutable /// /// Base relocation table (.reloc) /// - public BaseRelocationBlock[]? BaseRelocationTable { get; set; } + public BaseRelocation.Block[]? BaseRelocationTable { get; set; } /// /// Debug table (.debug*)