We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bf8db99 + b24b2c7 commit 95ddfefCopy full SHA for 95ddfef
Sources/MachOObjCSection/MachOFile+ObjectiveC.swift
@@ -56,13 +56,19 @@ extension MachOFile.ObjectiveC {
56
return nil
57
}
58
59
+ let offset = if let cache = machO.cache {
60
+ __objc_methlist.address - numericCast(cache.mainCacheHeader.sharedRegionStart)
61
+ } else {
62
+ __objc_methlist.offset
63
+ }
64
+
65
return .init(
66
data: machO.fileHandle.readData(
67
offset: numericCast(__objc_methlist.offset + machO.headerStartOffset),
68
size: __objc_methlist.size
69
),
- offset: numericCast(__objc_methlist.offset),
- align: numericCast(__objc_methlist.align),
70
+ offset: offset,
71
+ align: __objc_methlist.align,
72
is64Bit: machO.is64Bit
73
)
74
0 commit comments