| ... | @@ -59,6 +59,8 @@ pub const Regular = struct { | ... | @@ -59,6 +59,8 @@ pub const Regular = struct { |
| 59 | }; | 59 | }; |
| 60 | | 60 | |
| 61 | pub fn format(self: Regular, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | 61 | pub fn format(self: Regular, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { |
| | 62 | _ = fmt; |
| | 63 | _ = options; |
| 62 | try std.fmt.format(writer, "Regular {{ ", .{}); | 64 | try std.fmt.format(writer, "Regular {{ ", .{}); |
| 63 | try std.fmt.format(writer, ".linkage = {s}, ", .{self.linkage}); | 65 | try std.fmt.format(writer, ".linkage = {s}, ", .{self.linkage}); |
| 64 | try std.fmt.format(writer, ".address = 0x{x}, ", .{self.address}); | 66 | try std.fmt.format(writer, ".address = 0x{x}, ", .{self.address}); |
| ... | @@ -84,6 +86,8 @@ pub const Tentative = struct { | ... | @@ -84,6 +86,8 @@ pub const Tentative = struct { |
| 84 | file: ?*Object = null, | 86 | file: ?*Object = null, |
| 85 | | 87 | |
| 86 | pub fn format(self: Tentative, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | 88 | pub fn format(self: Tentative, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { |
| | 89 | _ = fmt; |
| | 90 | _ = options; |
| 87 | try std.fmt.format(writer, "Tentative {{ ", .{}); | 91 | try std.fmt.format(writer, "Tentative {{ ", .{}); |
| 88 | try std.fmt.format(writer, ".size = 0x{x}, ", .{self.size}); | 92 | try std.fmt.format(writer, ".size = 0x{x}, ", .{self.size}); |
| 89 | try std.fmt.format(writer, ".alignment = 0x{x}, ", .{self.alignment}); | 93 | try std.fmt.format(writer, ".alignment = 0x{x}, ", .{self.alignment}); |
| ... | @@ -116,6 +120,8 @@ pub const Proxy = struct { | ... | @@ -116,6 +120,8 @@ pub const Proxy = struct { |
| 116 | } | 120 | } |
| 117 | | 121 | |
| 118 | pub fn format(self: Proxy, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | 122 | pub fn format(self: Proxy, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { |
| | 123 | _ = fmt; |
| | 124 | _ = options; |
| 119 | try std.fmt.format(writer, "Proxy {{ ", .{}); | 125 | try std.fmt.format(writer, "Proxy {{ ", .{}); |
| 120 | if (self.bind_info.items.len > 0) { | 126 | if (self.bind_info.items.len > 0) { |
| 121 | // TODO | 127 | // TODO |
| ... | @@ -134,6 +140,8 @@ pub const Undefined = struct { | ... | @@ -134,6 +140,8 @@ pub const Undefined = struct { |
| 134 | file: ?*Object = null, | 140 | file: ?*Object = null, |
| 135 | | 141 | |
| 136 | pub fn format(self: Undefined, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { | 142 | pub fn format(self: Undefined, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void { |
| | 143 | _ = fmt; |
| | 144 | _ = options; |
| 137 | try std.fmt.format(writer, "Undefined {{ ", .{}); | 145 | try std.fmt.format(writer, "Undefined {{ ", .{}); |
| 138 | if (self.file) |file| { | 146 | if (self.file) |file| { |
| 139 | try std.fmt.format(writer, ".file = {s}, ", .{file.name.?}); | 147 | try std.fmt.format(writer, ".file = {s}, ", .{file.name.?}); |
| ... | @@ -192,7 +200,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 { | ... | @@ -192,7 +200,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 { |
| 192 | | 200 | |
| 193 | break :nlist nlist; | 201 | break :nlist nlist; |
| 194 | }, | 202 | }, |
| 195 | .tentative => |tentative| { | 203 | .tentative => { |
| 196 | // TODO | 204 | // TODO |
| 197 | break :nlist macho.nlist_64{ | 205 | break :nlist macho.nlist_64{ |
| 198 | .n_strx = n_strx, | 206 | .n_strx = n_strx, |
| ... | @@ -211,7 +219,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 { | ... | @@ -211,7 +219,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 { |
| 211 | .n_value = 0, | 219 | .n_value = 0, |
| 212 | }; | 220 | }; |
| 213 | }, | 221 | }, |
| 214 | .undef => |undef| { | 222 | .undef => { |
| 215 | // TODO | 223 | // TODO |
| 216 | break :nlist macho.nlist_64{ | 224 | break :nlist macho.nlist_64{ |
| 217 | .n_strx = n_strx, | 225 | .n_strx = n_strx, |