| ... | ... | @@ -3904,15 +3904,11 @@ fn sortShdrs(self: *Elf) !void { |
| 3904 | 3904 | shdr.sh_info = self.plt_section_index.?; |
| 3905 | 3905 | } |
| 3906 | 3906 | |
| 3907 | | for (&[_]?u16{ |
| 3908 | | self.zig_text_rela_section_index, |
| 3909 | | self.zig_data_rel_ro_rela_section_index, |
| 3910 | | self.zig_data_rela_section_index, |
| 3911 | | }) |maybe_index| { |
| 3912 | | const index = maybe_index orelse continue; |
| 3913 | | const shdr = &self.shdrs.items[index]; |
| 3914 | | shdr.sh_link = self.symtab_section_index.?; |
| 3915 | | shdr.sh_info = backlinks[shdr.sh_info]; |
| 3907 | for (self.shdrs.items) |*shdr| { |
| 3908 | if (shdr.sh_type == elf.SHT_RELA and shdr.sh_flags & elf.SHF_INFO_LINK != 0) { |
| 3909 | shdr.sh_link = self.symtab_section_index.?; |
| 3910 | shdr.sh_info = backlinks[shdr.sh_info]; |
| 3911 | } |
| 3916 | 3912 | } |
| 3917 | 3913 | |
| 3918 | 3914 | { |