summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorAlexander Taylor <alex@vector35.com>2024-06-11 14:56:36 -0400
committerAlexander Taylor <alex@vector35.com>2024-06-11 16:06:55 -0400
commitc699b8e96cb6b77c6f3d79ba246603db74c0c511 (patch)
treebf3250fd12cdd76ed1ff005aa3bc4dda3668db59 /arch/riscv
parentdda39e82169e7bb5747c2e58d22e2844f5832936 (diff)
More descriptive error for TP-relative reloc.
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/src/lib.rs9
1 files changed, 9 insertions, 0 deletions
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<D: 'static + RiscVDisassembler + Send + Sync> RiscVELFRelocationHandler<D>
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<D: 'static + RiscVDisassembler + Send + Sync> 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!(