authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-07-03 16:09:23+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-07-15 18:49:47+02:00
log669ac92af0626b77442415e54be3f604c5b49535
tree17428de9d1908740e901ea789a180308e052f15a
parent3bd9f3801771189ad1aa9d9b41786026add38075

zld: fix ast errors


1 files changed, 10 insertions(+), 2 deletions(-)

src/link/MachO/Symbol.zig+10-2
......@@ -59,6 +59,8 @@ pub const Regular = struct {
5959 };
6060
6161 pub fn format(self: Regular, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
62 _ = fmt;
63 _ = options;
6264 try std.fmt.format(writer, "Regular {{ ", .{});
6365 try std.fmt.format(writer, ".linkage = {s}, ", .{self.linkage});
6466 try std.fmt.format(writer, ".address = 0x{x}, ", .{self.address});
......@@ -84,6 +86,8 @@ pub const Tentative = struct {
8486 file: ?*Object = null,
8587
8688 pub fn format(self: Tentative, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
89 _ = fmt;
90 _ = options;
8791 try std.fmt.format(writer, "Tentative {{ ", .{});
8892 try std.fmt.format(writer, ".size = 0x{x}, ", .{self.size});
8993 try std.fmt.format(writer, ".alignment = 0x{x}, ", .{self.alignment});
......@@ -116,6 +120,8 @@ pub const Proxy = struct {
116120 }
117121
118122 pub fn format(self: Proxy, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
123 _ = fmt;
124 _ = options;
119125 try std.fmt.format(writer, "Proxy {{ ", .{});
120126 if (self.bind_info.items.len > 0) {
121127 // TODO
......@@ -134,6 +140,8 @@ pub const Undefined = struct {
134140 file: ?*Object = null,
135141
136142 pub fn format(self: Undefined, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) !void {
143 _ = fmt;
144 _ = options;
137145 try std.fmt.format(writer, "Undefined {{ ", .{});
138146 if (self.file) |file| {
139147 try std.fmt.format(writer, ".file = {s}, ", .{file.name.?});
......@@ -192,7 +200,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 {
192200
193201 break :nlist nlist;
194202 },
195 .tentative => |tentative| {
203 .tentative => {
196204 // TODO
197205 break :nlist macho.nlist_64{
198206 .n_strx = n_strx,
......@@ -211,7 +219,7 @@ pub fn asNlist(symbol: *Symbol, strtab: *StringTable) !macho.nlist_64 {
211219 .n_value = 0,
212220 };
213221 },
214 .undef => |undef| {
222 .undef => {
215223 // TODO
216224 break :nlist macho.nlist_64{
217225 .n_strx = n_strx,