| ... | @@ -5104,8 +5104,9 @@ pub fn sectionSymbolOutputSymtabIndex(self: Elf, shndx: u32) u32 { | ... | @@ -5104,8 +5104,9 @@ pub fn sectionSymbolOutputSymtabIndex(self: Elf, shndx: u32) u32 { |
| 5104 | if (self.eh_frame_section_index) |index| { | 5104 | if (self.eh_frame_section_index) |index| { |
| 5105 | if (index == shndx) return @intCast(self.output_sections.keys().len + 1); | 5105 | if (index == shndx) return @intCast(self.output_sections.keys().len + 1); |
| 5106 | } | 5106 | } |
| 5107 | for (self.merge_sections.items, 1..) |msec, index| { | 5107 | const base: usize = if (self.eh_frame_section_index == null) 0 else 1; |
| 5108 | if (msec.output_section_index == shndx) return @intCast(self.output_sections.keys().len + 1 + index); | 5108 | for (self.merge_sections.items, 0..) |msec, index| { |
| | 5109 | if (msec.output_section_index == shndx) return @intCast(self.output_sections.keys().len + 1 + index + base); |
| 5109 | } | 5110 | } |
| 5110 | return @intCast(self.output_sections.getIndex(shndx).? + 1); | 5111 | return @intCast(self.output_sections.getIndex(shndx).? + 1); |
| 5111 | } | 5112 | } |