| ... | ... | @@ -367,8 +367,6 @@ pub fn flushModule(self: *MachO, comp: *Compilation) !void { |
| 367 | 367 | .Lib => return error.TODOImplementWritingLibFiles, |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | | if (self.cmd_table_dirty) try self.writeCmdHeaders(); |
| 371 | | |
| 372 | 370 | { |
| 373 | 371 | // Update symbol table. |
| 374 | 372 | const nlocals = @intCast(u32, self.local_symbols.items.len); |
| ... | ... | @@ -378,6 +376,8 @@ pub fn flushModule(self: *MachO, comp: *Compilation) !void { |
| 378 | 376 | symtab.nsyms = nlocals + nglobals + nundefs; |
| 379 | 377 | } |
| 380 | 378 | |
| 379 | if (self.cmd_table_dirty) try self.writeCmdHeaders(); |
| 380 | |
| 381 | 381 | if (self.entry_addr == null and self.base.options.output_mode == .Exe) { |
| 382 | 382 | log.debug("flushing. no_entry_point_found = true\n", .{}); |
| 383 | 383 | self.error_flags.no_entry_point_found = true; |