mirror of
https://github.com/ziglang/zig.git
synced 2025-12-29 17:43:17 +00:00
elf: relax R_X86_64_32 into jump table indirection if zig_offset_table set
This commit is contained in:
parent
7556b32840
commit
4c2b34e8ab
@ -1254,7 +1254,10 @@ const x86_64 = struct {
|
||||
try cwriter.writeInt(i32, @as(i32, @intCast(G + GOT + A - P)), .little);
|
||||
},
|
||||
|
||||
.@"32" => try cwriter.writeInt(u32, @as(u32, @truncate(@as(u64, @intCast(S + A)))), .little),
|
||||
.@"32" => {
|
||||
const S_ = if (target.flags.zig_offset_table) target.zigOffsetTableAddress(elf_file) else S;
|
||||
try cwriter.writeInt(u32, @as(u32, @truncate(@as(u64, @intCast(S_ + A)))), .little);
|
||||
},
|
||||
.@"32S" => try cwriter.writeInt(i32, @as(i32, @truncate(S + A)), .little),
|
||||
|
||||
.TPOFF32 => try cwriter.writeInt(i32, @as(i32, @truncate(S + A - TP)), .little),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user