Skip to content

Commit

Permalink
Add addend property to dyld chained import protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
p-x9 committed May 14, 2024
1 parent 0c93973 commit 61cbabf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Sources/MachOKit/Model/DyldChain/DyldChainedImport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public struct DyldChainedImportGeneral: DyldChainedImportProtocol {
public var nameOffset: Int {
numericCast(layout.name_offset)
}

public var addend: Int {
0
}
}

public struct DyldChainedImportAddend: DyldChainedImportProtocol {
Expand All @@ -55,6 +59,10 @@ public struct DyldChainedImportAddend: DyldChainedImportProtocol {
public var nameOffset: Int {
numericCast(layout.name_offset)
}

public var addend: Int {
numericCast(layout.addend)
}
}

public struct DyldChainedImportAddend64: DyldChainedImportProtocol {
Expand All @@ -72,6 +80,10 @@ public struct DyldChainedImportAddend64: DyldChainedImportProtocol {
public var nameOffset: Int {
numericCast(layout.name_offset)
}

public var addend: Int {
numericCast(layout.addend)
}
}

extension DyldChainedImportGeneral {
Expand Down
1 change: 1 addition & 0 deletions Sources/MachOKit/Protocol/DyldChainedImportProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public protocol DyldChainedImportProtocol: LayoutWrapper {
var libraryOrdinal: Int { get }
var isWeakImport: Bool { get }
var nameOffset: Int { get }
var addend: Int { get }
}

extension DyldChainedImportProtocol {
Expand Down

0 comments on commit 61cbabf

Please sign in to comment.