Skip to content

Commit

Permalink
Merge pull request #84 from p-x9/fix/section-start-pointer
Browse files Browse the repository at this point in the history
Fix caluculation of section start pointer in mach-o image
  • Loading branch information
p-x9 committed May 17, 2024
2 parents 1fe160c + 15c6b22 commit 962dea7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/MachOKit/LoadCommand/Model/Section.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public protocol SectionProtocol: LayoutWrapper {
extension SectionProtocol {
public func startPtr(in segment: any SegmentCommandProtocol, vmaddrSlide: Int) -> UnsafeRawPointer? {
segment.startPtr(vmaddrSlide: vmaddrSlide)?
.advanced(by: -segment.fileOffset)
.advanced(by: offset)
}
}
Expand Down

0 comments on commit 962dea7

Please sign in to comment.