commit ace1a69a55dd77a8189b7408b126d9d1ca0066ee (tree)
parent 975862aca9a68f1d6fa786b6cef19bcc7b1aec2a
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Sat, 17 Feb 2024 11:41:18 +0100
elf: add new R_RISCV_TLSDESC reloc type
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/std/elf.zig b/lib/std/elf.zig
@@ -2181,6 +2181,7 @@ pub const R_RISCV = enum(u32) {
R_RISCV_TLS_DTPREL64 = 9,
R_RISCV_TLS_TPREL32 = 10,
R_RISCV_TLS_TPREL64 = 11,
+ R_RISVC_TLSDESC = 12,
R_RISCV_BRANCH = 16,
R_RISCV_JAL = 17,
R_RISCV_CALL = 18,
diff --git a/src/link/Elf/relocation.zig b/src/link/Elf/relocation.zig
@@ -64,6 +64,7 @@ const riscv64_relocs = Table(8, elf.R_RISCV, .{
.{ .dtpmod, .R_RISCV_TLS_DTPMOD64 },
.{ .dtpoff, .R_RISCV_TLS_DTPREL64 },
.{ .tpoff, .R_RISCV_TLS_TPREL64 },
+ .{ .tlsdesc, .R_RISCV_TLSDESC },
});
pub fn decode(r_type: u32, cpu_arch: std.Target.Cpu.Arch) ?Kind {