[lld] [RISC-V][LLD] Add Support for RISC-V TLSDESC Relocations (PR #66916)
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 00:41:37 PDT 2023
================
@@ -1897,7 +1897,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
}
}
- if (config->emachine == EM_386 || config->emachine == EM_X86_64) {
+ if (config->emachine == EM_386 || config->emachine == EM_X86_64 ||
+ config->emachine == EM_RISCV) {
// On targets that support TLSDESC, _TLS_MODULE_BASE_ is defined in such a
----------------
rui314 wrote:
I believe lld supports TLSDESC for ARM64 because it's the default TLS access model on ARM64. The comment here says that `_TLS_MODULE_BASE_` is defined for targets that support TLSDESC. But the `if` condition includes only i386 and x86-64. It doesn't seem correct. Not directly related to this change, though.
https://github.com/llvm/llvm-project/pull/66916
More information about the llvm-commits
mailing list