diff --git a/src/link/Elf/Atom.zig b/src/link/Elf/Atom.zig index eb78f10068..f391326670 100644 --- a/src/link/Elf/Atom.zig +++ b/src/link/Elf/Atom.zig @@ -1666,6 +1666,7 @@ const aarch64 = struct { .LDST64_ABS_LO12_NC, .LDST128_ABS_LO12_NC, .PREL32, + .PREL64, => {}, else => try atom.reportUnhandledRelocError(rel, elf_file), @@ -1727,6 +1728,11 @@ const aarch64 = struct { mem.writeInt(u32, code, @bitCast(value), .little); }, + .PREL64 => { + const value = S + A - P; + mem.writeInt(u64, code_buffer[r_offset..][0..8], @bitCast(value), .little); + }, + .ADR_PREL_PG_HI21 => { // TODO: check for relaxation of ADRP+ADD const saddr = @as(u64, @intCast(P));