mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 16:13:07 +00:00
elf: fix emitting cross-section relocs for .debug* sections
This commit is contained in:
parent
c4d820b3f1
commit
fe6dfd5090
@ -238,7 +238,7 @@ pub fn flushModule(self: *ZigObject, elf_file: *Elf, tid: Zcu.PerThread.Id) !voi
|
||||
unit.header_len + unit.getEntry(source_entry).off
|
||||
else
|
||||
0);
|
||||
const r_addend: i64 = @intCast(reloc.target_off + (if (reloc.target_entry.unwrap()) |target_entry|
|
||||
const r_addend: i64 = @intCast(target_unit.off + reloc.target_off + (if (reloc.target_entry.unwrap()) |target_entry|
|
||||
target_unit.header_len + target_unit.getEntry(target_entry).assertNonEmpty(unit, sect, dwarf).off
|
||||
else
|
||||
0));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user