@@ -66,6 +66,9 @@ module LoadCommands
66
66
( LC_REQ_DYLD | 0x34 ) => :LC_DYLD_CHAINED_FIXUPS ,
67
67
( LC_REQ_DYLD | 0x35 ) => :LC_FILESET_ENTRY ,
68
68
0x36 => :LC_ATOM_INFO ,
69
+ 0x37 => :LC_FUNCTION_VARIANTS ,
70
+ 0x38 => :LC_FUNCTION_VARIANT_FIXUPS ,
71
+ 0x39 => :LC_TARGET_TRIPLE ,
69
72
} . freeze
70
73
71
74
# association of symbol representations to load command constants
@@ -155,6 +158,9 @@ module LoadCommands
155
158
:LC_DYLD_CHAINED_FIXUPS => "LinkeditDataCommand" ,
156
159
:LC_FILESET_ENTRY => "FilesetEntryCommand" ,
157
160
:LC_ATOM_INFO => "LinkeditDataCommand" ,
161
+ :LC_FUNCTION_VARIANTS => "LinkeditDataCommand" ,
162
+ :LC_FUNCTION_VARIANT_FIXUPS => "LinkeditDataCommand" ,
163
+ :LC_TARGET_TRIPLE => "TargetTripleCommand" ,
158
164
} . freeze
159
165
160
166
# association of segment name symbols to names
@@ -1053,11 +1059,26 @@ def to_h
1053
1059
end
1054
1060
end
1055
1061
1062
+ # A load command containing the target triple used when compiling the binary.
1063
+ # Corresponds to LC_TARGET_TRIPLE.
1064
+ class TargetTripleCommand < LoadCommand
1065
+ # @return [LCStr] the target triple used when compiling the binary
1066
+ field :triple , :lcstr , :to_s => true
1067
+
1068
+ # @return [Hash] a hash representation of this {RpathCommand}
1069
+ def to_h
1070
+ {
1071
+ "triple" => triple . to_h ,
1072
+ } . merge super
1073
+ end
1074
+ end
1075
+
1056
1076
# A load command representing the offsets and sizes of a blob of data in
1057
1077
# the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE,
1058
1078
# LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE,
1059
1079
# LC_DYLIB_CODE_SIGN_DRS, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE,
1060
- # LC_DYLD_CHAINED_FIXUPS, or LC_ATOM_INFO.
1080
+ # LC_DYLD_CHAINED_FIXUPS, LC_ATOM_INFO, LC_FUNCTION_VARIANTS,
1081
+ # or LC_FUNCTION_VARIANT_FIXUPS.
1061
1082
class LinkeditDataCommand < LoadCommand
1062
1083
# @return [Integer] offset to the data in the __LINKEDIT segment
1063
1084
field :dataoff , :uint32
0 commit comments