| ... | @@ -249,7 +249,7 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { | ... | @@ -249,7 +249,7 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { |
| 249 | const in_symtab = self.in_symtab orelse { | 249 | const in_symtab = self.in_symtab orelse { |
| 250 | for (self.sections.items) |sect, id| { | 250 | for (self.sections.items) |sect, id| { |
| 251 | if (sect.isDebug()) continue; | 251 | if (sect.isDebug()) continue; |
| 252 | const match = (try macho_file.getOutputSection(sect)) orelse { | 252 | const out_sect_id = (try macho_file.getOutputSection(sect)) orelse { |
| 253 | log.debug(" unhandled section", .{}); | 253 | log.debug(" unhandled section", .{}); |
| 254 | continue; | 254 | continue; |
| 255 | }; | 255 | }; |
| ... | @@ -261,7 +261,7 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { | ... | @@ -261,7 +261,7 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { |
| 261 | try self.symtab.append(gpa, .{ | 261 | try self.symtab.append(gpa, .{ |
| 262 | .n_strx = 0, | 262 | .n_strx = 0, |
| 263 | .n_type = macho.N_SECT, | 263 | .n_type = macho.N_SECT, |
| 264 | .n_sect = match + 1, | 264 | .n_sect = out_sect_id + 1, |
| 265 | .n_desc = 0, | 265 | .n_desc = 0, |
| 266 | .n_value = sect.addr, | 266 | .n_value = sect.addr, |
| 267 | }); | 267 | }); |
| ... | @@ -282,10 +282,10 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { | ... | @@ -282,10 +282,10 @@ pub fn splitIntoAtoms(self: *Object, macho_file: *MachO, object_id: u32) !void { |
| 282 | code, | 282 | code, |
| 283 | relocs, | 283 | relocs, |
| 284 | &.{}, | 284 | &.{}, |
| 285 | match, | 285 | out_sect_id, |
| 286 | sect, | 286 | sect, |
| 287 | ); | 287 | ); |
| 288 | try macho_file.addAtomToSection(atom, match); | 288 | try macho_file.addAtomToSection(atom); |
| 289 | } | 289 | } |
| 290 | return; | 290 | return; |
| 291 | }; | 291 | }; |