mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 00:26:57 +00:00
elf+aarch64: handle PREL64 reloc
This commit is contained in:
parent
b7b63855d0
commit
2cdbad6f10
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user