| ... | ... | @@ -731,15 +731,7 @@ pub fn resolveRelocsAlloc(self: Atom, elf_file: *Elf, code: []u8) RelocError!voi |
| 731 | 731 | // Address of the target symbol - can be address of the symbol within an atom or address of PLT stub. |
| 732 | 732 | const S = @as(i64, @intCast(target.address(.{}, elf_file))); |
| 733 | 733 | // Address of the global offset table. |
| 734 | | const GOT = blk: { |
| 735 | | const shndx = if (elf_file.got_plt_section_index) |shndx| |
| 736 | | shndx |
| 737 | | else if (elf_file.got_section_index) |shndx| |
| 738 | | shndx |
| 739 | | else |
| 740 | | null; |
| 741 | | break :blk if (shndx) |index| @as(i64, @intCast(elf_file.shdrs.items[index].sh_addr)) else 0; |
| 742 | | }; |
| 734 | const GOT = @as(i64, @intCast(elf_file.gotAddress())); |
| 743 | 735 | // Address of the .zig.got table entry if any. |
| 744 | 736 | const ZIG_GOT = @as(i64, @intCast(target.zigGotAddress(elf_file))); |
| 745 | 737 | // Relative offset to the start of the global offset table. |
| ... | ... | @@ -924,15 +916,7 @@ pub fn resolveRelocsNonAlloc(self: Atom, elf_file: *Elf, code: []u8, undefs: any |
| 924 | 916 | // Address of the target symbol - can be address of the symbol within an atom or address of PLT stub. |
| 925 | 917 | const S = @as(i64, @intCast(target.address(.{}, elf_file))); |
| 926 | 918 | // Address of the global offset table. |
| 927 | | const GOT = blk: { |
| 928 | | const shndx = if (elf_file.got_plt_section_index) |shndx| |
| 929 | | shndx |
| 930 | | else if (elf_file.got_section_index) |shndx| |
| 931 | | shndx |
| 932 | | else |
| 933 | | null; |
| 934 | | break :blk if (shndx) |index| @as(i64, @intCast(elf_file.shdrs.items[index].sh_addr)) else 0; |
| 935 | | }; |
| 919 | const GOT = @as(i64, @intCast(elf_file.gotAddress())); |
| 936 | 920 | // Address of the dynamic thread pointer. |
| 937 | 921 | const DTP = @as(i64, @intCast(elf_file.dtpAddress())); |
| 938 | 922 | |