| ... | ... | @@ -23,6 +23,7 @@ pub const LoadCommand = union(enum) { |
| 23 | 23 | Main: macho.entry_point_command, |
| 24 | 24 | VersionMin: macho.version_min_command, |
| 25 | 25 | SourceVersion: macho.source_version_command, |
| 26 | Uuid: macho.uuid_command, |
| 26 | 27 | LinkeditData: macho.linkedit_data_command, |
| 27 | 28 | Unknown: GenericCommandWithData(macho.load_command), |
| 28 | 29 | |
| ... | ... | @@ -62,6 +63,9 @@ pub const LoadCommand = union(enum) { |
| 62 | 63 | macho.LC_SOURCE_VERSION => LoadCommand{ |
| 63 | 64 | .SourceVersion = try stream.reader().readStruct(macho.source_version_command), |
| 64 | 65 | }, |
| 66 | macho.LC_UUID => LoadCommand{ |
| 67 | .Uuid = try stream.reader().readStruct(macho.uuid_command), |
| 68 | }, |
| 65 | 69 | macho.LC_FUNCTION_STARTS, macho.LC_DATA_IN_CODE, macho.LC_CODE_SIGNATURE => LoadCommand{ |
| 66 | 70 | .LinkeditData = try stream.reader().readStruct(macho.linkedit_data_command), |
| 67 | 71 | }, |
| ... | ... | @@ -79,6 +83,7 @@ pub const LoadCommand = union(enum) { |
| 79 | 83 | .Main => |x| writeStruct(x, writer), |
| 80 | 84 | .VersionMin => |x| writeStruct(x, writer), |
| 81 | 85 | .SourceVersion => |x| writeStruct(x, writer), |
| 86 | .Uuid => |x| writeStruct(x, writer), |
| 82 | 87 | .LinkeditData => |x| writeStruct(x, writer), |
| 83 | 88 | .Segment => |x| x.write(writer), |
| 84 | 89 | .Dylinker => |x| x.write(writer), |
| ... | ... | @@ -95,6 +100,7 @@ pub const LoadCommand = union(enum) { |
| 95 | 100 | .Main => |x| x.cmd, |
| 96 | 101 | .VersionMin => |x| x.cmd, |
| 97 | 102 | .SourceVersion => |x| x.cmd, |
| 103 | .Uuid => |x| x.cmd, |
| 98 | 104 | .LinkeditData => |x| x.cmd, |
| 99 | 105 | .Segment => |x| x.inner.cmd, |
| 100 | 106 | .Dylinker => |x| x.inner.cmd, |
| ... | ... | @@ -112,6 +118,7 @@ pub const LoadCommand = union(enum) { |
| 112 | 118 | .VersionMin => |x| x.cmdsize, |
| 113 | 119 | .SourceVersion => |x| x.cmdsize, |
| 114 | 120 | .LinkeditData => |x| x.cmdsize, |
| 121 | .Uuid => |x| x.cmdsize, |
| 115 | 122 | .Segment => |x| x.inner.cmdsize, |
| 116 | 123 | .Dylinker => |x| x.inner.cmdsize, |
| 117 | 124 | .Dylib => |x| x.inner.cmdsize, |
| ... | ... | @@ -142,6 +149,7 @@ pub const LoadCommand = union(enum) { |
| 142 | 149 | .Main => |x| meta.eql(x, other.Main), |
| 143 | 150 | .VersionMin => |x| meta.eql(x, other.VersionMin), |
| 144 | 151 | .SourceVersion => |x| meta.eql(x, other.SourceVersion), |
| 152 | .Uuid => |x| meta.eql(x, other.Uuid), |
| 145 | 153 | .LinkeditData => |x| meta.eql(x, other.LinkeditData), |
| 146 | 154 | .Segment => |x| x.eql(other.Segment), |
| 147 | 155 | .Dylinker => |x| x.eql(other.Dylinker), |