| ... | ... | @@ -512,10 +512,10 @@ pub fn parseTextBlocks(self: *Object, zld: *Zld) !void { |
| 512 | 512 | const relocs = mem.bytesAsSlice(macho.relocation_info, raw_relocs); |
| 513 | 513 | |
| 514 | 514 | // Is there any padding between symbols within the section? |
| 515 | | const is_padded = self.header.?.flags & macho.MH_SUBSECTIONS_VIA_SYMBOLS != 0; |
| 515 | const is_splittable = self.header.?.flags & macho.MH_SUBSECTIONS_VIA_SYMBOLS != 0; |
| 516 | 516 | |
| 517 | 517 | next: { |
| 518 | | if (is_padded) blocks: { |
| 518 | if (is_splittable) blocks: { |
| 519 | 519 | const filtered_nlists = NlistWithIndex.filterInSection( |
| 520 | 520 | sorted_nlists.items, |
| 521 | 521 | sect_id + 1, |
| ... | ... | @@ -540,6 +540,8 @@ pub fn parseTextBlocks(self: *Object, zld: *Zld) !void { |
| 540 | 540 | if (reg.file) |file| { |
| 541 | 541 | if (file != self) { |
| 542 | 542 | log.warn("deduping definition of {s} in {s}", .{ sym.name, self.name.? }); |
| 543 | block.deinit(self.allocator); |
| 544 | self.allocator.destroy(block); |
| 543 | 545 | continue; |
| 544 | 546 | } |
| 545 | 547 | } |