Commit 5ef63e333a
Changed files (2)
src
link
src/link/MachO/ZigObject.zig
@@ -110,6 +110,7 @@ pub fn addAtom(self: *ZigObject, macho_file: *MachO) !Symbol.Index {
const atom = macho_file.getAtom(atom_index).?;
atom.file = self.index;
+ atom.atom_index = atom_index;
const symbol = macho_file.getSymbol(symbol_index);
symbol.file = self.index;
src/link/MachO.zig
@@ -3779,6 +3779,13 @@ fn fmtDumpState(
) !void {
_ = options;
_ = unused_fmt_string;
+ if (self.getZigObject()) |zo| {
+ try writer.print("zig_object({d}) : {s}\n", .{ zo.index, zo.path });
+ try writer.print("{}{}\n", .{
+ zo.fmtAtoms(self),
+ zo.fmtSymtab(self),
+ });
+ }
for (self.objects.items) |index| {
const object = self.getFile(index).?.object;
try writer.print("object({d}) : {} : has_debug({})", .{