| ... | ... | @@ -428,21 +428,12 @@ pub fn flushModule(self: *MachO, comp: *Compilation, prog_node: *std.Progress.No |
| 428 | 428 | var actions = std.ArrayList(ResolveAction).init(self.base.allocator); |
| 429 | 429 | defer actions.deinit(); |
| 430 | 430 | try self.resolveSymbols(&actions); |
| 431 | try self.reportUndefined(); |
| 431 | 432 | |
| 432 | 433 | if (self.getEntryPoint() == null) { |
| 433 | 434 | self.error_flags.no_entry_point_found = true; |
| 434 | 435 | } |
| 435 | 436 | |
| 436 | | if (self.unresolved.count() > 0) { |
| 437 | | for (self.unresolved.keys()) |index| { |
| 438 | | // TODO: convert into compiler errors. |
| 439 | | const global = self.globals.items[index]; |
| 440 | | const sym_name = self.getSymbolName(global); |
| 441 | | log.err("undefined symbol reference '{s}'", .{sym_name}); |
| 442 | | } |
| 443 | | return error.UndefinedSymbolReference; |
| 444 | | } |
| 445 | | |
| 446 | 437 | for (actions.items) |action| switch (action.kind) { |
| 447 | 438 | .none => {}, |
| 448 | 439 | .add_got => try self.addGotEntry(action.target), |