| ... | ... | @@ -550,6 +550,8 @@ pub fn calcSymtabSize(self: *ZigObject, macho_file: *MachO) void { |
| 550 | 550 | const file = ref.getFile(macho_file) orelse continue; |
| 551 | 551 | if (file.getIndex() != self.index) continue; |
| 552 | 552 | if (sym.getAtom(macho_file)) |atom| if (!atom.isAlive()) continue; |
| 553 | const name = sym.getName(macho_file); |
| 554 | assert(name.len > 0); |
| 553 | 555 | sym.flags.output_symtab = true; |
| 554 | 556 | if (sym.isLocal()) { |
| 555 | 557 | sym.addExtra(.{ .symtab = self.output_symtab_ctx.nlocals }, macho_file); |
| ... | ... | @@ -562,7 +564,7 @@ pub fn calcSymtabSize(self: *ZigObject, macho_file: *MachO) void { |
| 562 | 564 | sym.addExtra(.{ .symtab = self.output_symtab_ctx.nimports }, macho_file); |
| 563 | 565 | self.output_symtab_ctx.nimports += 1; |
| 564 | 566 | } |
| 565 | | self.output_symtab_ctx.strsize += @as(u32, @intCast(sym.getName(macho_file).len + 1)); |
| 567 | self.output_symtab_ctx.strsize += @as(u32, @intCast(name.len + 1)); |
| 566 | 568 | } |
| 567 | 569 | } |
| 568 | 570 | |