From c699b8e96cb6b77c6f3d79ba246603db74c0c511 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Tue, 11 Jun 2024 14:56:36 -0400 Subject: More descriptive error for TP-relative reloc. --- arch/riscv/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/riscv/src/lib.rs b/arch/riscv/src/lib.rs index bc67e465..e619df2a 100644 --- a/arch/riscv/src/lib.rs +++ b/arch/riscv/src/lib.rs @@ -2164,6 +2164,8 @@ impl RiscVELFRelocationHandler const R_RISCV_RELATIVE: u64 = 3; const R_RISCV_COPY: u64 = 4; const R_RISCV_JUMP_SLOT: u64 = 5; + const R_RISCV_TLS_TPREL32: u64 = 10; + const R_RISCV_TLS_TPREL64: u64 = 11; const R_RISCV_BRANCH: u64 = 16; const R_RISCV_JAL: u64 = 17; const R_RISCV_CALL: u64 = 18; @@ -2335,6 +2337,13 @@ impl RelocationHandler reloc.size = 2; reloc.truncate_size = 2; } + Self::R_RISCV_TLS_TPREL32 | Self::R_RISCV_TLS_TPREL64 => { + reloc.type_ = RelocationType::UnhandledRelocation; + log::warn!( + "Unhandled relocation type R_RISCV_TLS_TPREL at {:x?}", + reloc.address + ) + } _ => { reloc.type_ = RelocationType::UnhandledRelocation; log::warn!( -- cgit v1.3.1