| author | |
| committer | |
| log | 0211d6bf4f0da9ebea91fe8378181f354b89f073 |
| tree | 382c8780f350eb8cbb0fdb8ad6dae6d7d82c4ee9 |
| parent | e22b3595c1af232372ebf3c70922e86e6f9e9076 |
2 files changed, 6 insertions(+), 9 deletions(-)
src/link/Elf.zig+5-9| ... | @@ -3904,15 +3904,11 @@ fn sortShdrs(self: *Elf) !void { | ... | @@ -3904,15 +3904,11 @@ fn sortShdrs(self: *Elf) !void { |
| 3904 | shdr.sh_info = self.plt_section_index.?; | 3904 | shdr.sh_info = self.plt_section_index.?; |
| 3905 | } | 3905 | } |
| 3906 | 3906 | ||
| 3907 | for (&[_]?u16{ | 3907 | for (self.shdrs.items) |*shdr| { |
| 3908 | self.zig_text_rela_section_index, | 3908 | if (shdr.sh_type == elf.SHT_RELA and shdr.sh_flags & elf.SHF_INFO_LINK != 0) { |
| 3909 | self.zig_data_rel_ro_rela_section_index, | 3909 | shdr.sh_link = self.symtab_section_index.?; |
| 3910 | self.zig_data_rela_section_index, | 3910 | shdr.sh_info = backlinks[shdr.sh_info]; |
| 3911 | }) |maybe_index| { | 3911 | } |
| 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]; | ||
| 3916 | } | 3912 | } |
| 3917 | 3913 | ||
| 3918 | { | 3914 | { |
src/link/Elf/Object.zig+1| ... | @@ -668,6 +668,7 @@ pub fn initRelaSections(self: Object, elf_file: *Elf) !void { | ... | @@ -668,6 +668,7 @@ pub fn initRelaSections(self: Object, elf_file: *Elf) !void { |
| 668 | const out_shdr = &elf_file.shdrs.items[out_shndx]; | 668 | const out_shdr = &elf_file.shdrs.items[out_shndx]; |
| 669 | out_shdr.sh_addralign = @alignOf(elf.Elf64_Rela); | 669 | out_shdr.sh_addralign = @alignOf(elf.Elf64_Rela); |
| 670 | out_shdr.sh_entsize = @sizeOf(elf.Elf64_Rela); | 670 | out_shdr.sh_entsize = @sizeOf(elf.Elf64_Rela); |
| 671 | out_shdr.sh_info = self.initOutputSection(elf_file, atom.inputShdr(elf_file)) catch unreachable; | ||
| 671 | } | 672 | } |
| 672 | } | 673 | } |
| 673 | 674 |