| ... | @@ -558,7 +558,7 @@ pub fn writeRelaSections(self: ZigObject, elf_file: *Elf) !void { | ... | @@ -558,7 +558,7 @@ pub fn writeRelaSections(self: ZigObject, elf_file: *Elf) !void { |
| 558 | while (true) { | 558 | while (true) { |
| 559 | for (atom.relocs(elf_file)) |rel| { | 559 | for (atom.relocs(elf_file)) |rel| { |
| 560 | const target = elf_file.symbol(self.symbol(rel.r_sym())); | 560 | const target = elf_file.symbol(self.symbol(rel.r_sym())); |
| 561 | const r_offset = target.value + rel.r_offset; | 561 | const r_offset = atom.value + rel.r_offset; |
| 562 | const r_sym: u32 = if (target.flags.global) | 562 | const r_sym: u32 = if (target.flags.global) |
| 563 | (target.esym_index & symbol_mask) + @as(u32, @intCast(self.local_esyms.slice().len)) | 563 | (target.esym_index & symbol_mask) + @as(u32, @intCast(self.local_esyms.slice().len)) |
| 564 | else | 564 | else |