elf: add new R_RISCV_TLSDESC reloc type

This commit is contained in:
Jakub Konka 2024-02-17 11:41:18 +01:00
parent 975862aca9
commit ace1a69a55
2 changed files with 2 additions and 0 deletions

View File

@ -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,

View File

@ -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 {