/// <summary> /// Builds a memory map for a tag. /// </summary> /// <param name="data">The tag data to build a memory map for.</param> /// <returns>The built map.</returns> private static MemoryMap BuildTagMap(TagData data) { // Create a memory map with a boundary at each fixup target // and at the main structure var result = new MemoryMap(0, (uint)data.Data.Length); result.AddBoundary(data.MainStructOffset); result.AddBoundaries(data.PointerFixups.Select(f => f.TargetOffset)); return result; }
/// <summary> /// Builds a memory map for a tag. /// </summary> /// <param name="data">The tag data to build a memory map for.</param> /// <returns>The built map.</returns> private static MemoryMap BuildTagMap(CachedTagData data) { // Create a memory map with a boundary at each fixup target // and at the main structure var result = new MemoryMap(0, (uint)data.Data.Length); result.AddBoundary(data.MainStructOffset); result.AddBoundaries(data.PointerFixups.Select(f => f.TargetOffset)); return(result); }