macho: set atom_index for newly created Atom in ZigObject
This commit is contained in:
parent
5d0ea3fd27
commit
5ef63e333a
|
@ -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({})", .{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user