[lld] 3046e7d - [ELF] Support missing relocations in RISCV::getImplicitAddend()
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 30 10:56:07 PDT 2022
Author: Fangrui Song
Date: 2022-07-30T10:55:59-07:00
New Revision: 3046e7d8e7fdcdd03ee3471e7391049aed51502b
URL: https://github.com/llvm/llvm-project/commit/3046e7d8e7fdcdd03ee3471e7391049aed51502b
DIFF: https://github.com/llvm/llvm-project/commit/3046e7d8e7fdcdd03ee3471e7391049aed51502b.diff
LOG: [ELF] Support missing relocations in RISCV::getImplicitAddend()
Added:
Modified:
lld/ELF/Arch/RISCV.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp
index 8fca1a686a79..97cc94da7e4f 100644
--- a/lld/ELF/Arch/RISCV.cpp
+++ b/lld/ELF/Arch/RISCV.cpp
@@ -159,8 +159,12 @@ int64_t RISCV::getImplicitAddend(const uint8_t *buf, RelType type) const {
case R_RISCV_32:
case R_RISCV_TLS_DTPMOD32:
case R_RISCV_TLS_DTPREL32:
+ case R_RISCV_TLS_TPREL32:
return SignExtend64<32>(read32le(buf));
case R_RISCV_64:
+ case R_RISCV_TLS_DTPMOD64:
+ case R_RISCV_TLS_DTPREL64:
+ case R_RISCV_TLS_TPREL64:
return read64le(buf);
case R_RISCV_RELATIVE:
case R_RISCV_IRELATIVE:
More information about the llvm-commits
mailing list