authorgravatar for rpkak@noreply.codeberg.orgrpkak <rpkak@noreply.codeberg.org> 2026-04-22 09:18:52+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-22 19:15:18+02:00
log9df02121d0d87c17173f79d55692bed9cb65722c
tree4e9937b1907d6876855e94d205ba63736e019e70
parent8a113f83d4e11403f51a67c84a451c9d8592e231

link.Elf: support R_X86_64_PC64


1 files changed, 2 insertions(+), 1 deletions(-)

src/link/Elf/Atom.zig+2-1
...@@ -983,7 +983,7 @@ const x86_64 = struct {...@@ -983,7 +983,7 @@ const x86_64 = struct {
983 }983 }
984 },984 },
985985
986 .PC32 => {986 .PC32, .PC64 => {
987 try atom.scanReloc(symbol, rel, pcRelocAction(symbol, elf_file), elf_file);987 try atom.scanReloc(symbol, rel, pcRelocAction(symbol, elf_file), elf_file);
988 },988 },
989989
...@@ -1083,6 +1083,7 @@ const x86_64 = struct {...@@ -1083,6 +1083,7 @@ const x86_64 = struct {
10831083
1084 .PLT32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(S + A - P)), .little),1084 .PLT32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(S + A - P)), .little),
1085 .PC32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(S + A - P)), .little),1085 .PC32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(S + A - P)), .little),
1086 .PC64 => mem.writeInt(i64, code[r_offset..][0..8], S + A - P, .little),
10861087
1087 .GOTPCREL => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(G + GOT + A - P)), .little),1088 .GOTPCREL => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(G + GOT + A - P)), .little),
1088 .GOTPC32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(GOT + A - P)), .little),1089 .GOTPC32 => mem.writeInt(i32, code[r_offset..][0..4], @as(i32, @intCast(GOT + A - P)), .little),