| ... | ... | @@ -156,10 +156,12 @@ pub fn parse(self: *Object, macho_file: *MachO) !void { |
| 156 | 156 | try self.initSymbolStabs(nlists.items, macho_file); |
| 157 | 157 | try self.initRelocs(macho_file); |
| 158 | 158 | |
| 159 | // Parse DWARF __TEXT,__eh_frame section |
| 159 | 160 | if (self.eh_frame_sect_index) |index| { |
| 160 | 161 | try self.initEhFrameRecords(index, macho_file); |
| 161 | 162 | } |
| 162 | 163 | |
| 164 | // Parse Apple's __LD,__compact_unwind section |
| 163 | 165 | if (self.compact_unwind_sect_index) |index| { |
| 164 | 166 | try self.initUnwindRecords(index, macho_file); |
| 165 | 167 | } |
| ... | ... | @@ -841,7 +843,7 @@ fn parseUnwindRecords(self: *Object, macho_file: *MachO) !void { |
| 841 | 843 | if (nlist.stab()) continue; |
| 842 | 844 | if (!nlist.sect()) continue; |
| 843 | 845 | const sect = self.sections.items(.header)[nlist.n_sect - 1]; |
| 844 | | if (sect.isCode()) { |
| 846 | if (sect.isCode() and sect.size > 0) { |
| 845 | 847 | try superposition.ensureUnusedCapacity(1); |
| 846 | 848 | const gop = superposition.getOrPutAssumeCapacity(nlist.n_value); |
| 847 | 849 | if (gop.found_existing) { |