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