authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-09-18 11:01:29+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-09-18 11:01:29+02:00
logf4706c23e9aadb53dd6620107ae5c7676e2dab86
treec64d8d0fdd77d2ccf8af940b8b3dea72492db3e8
parent372acb83500e9f910f48b78eaca4bf35a6e4f9d8

macho: fix after sync with master


1 files changed, 4 insertions(+), 4 deletions(-)

src/link/MachO/Object.zig+4-4
...@@ -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 };