================
@@ -1480,7 +1480,13 @@ template <class ELFT, class RelTy> void 
RelocationScanner::scanOne(RelTy *&i) {
 
   // Process TLS relocations, including TLS optimizations. Note that
   // R_TPREL and R_TPREL_NEG relocations are resolved in processAux.
-  if (sym.isTls()) {
+  if (sym.isTls() ||
----------------
MaskRay wrote:

Attach this diff
```
-  if (sym.isTls() ||
-      // These RISCV TLSDESC relocations reference a local symbol that won't be
-      // a TLS symbol, but we need to process them in handleTlsRelocation the
-      // same as other TLS relocations.
-      (config->emachine == EM_RISCV &&
-       (type == R_RISCV_TLSDESC_CALL || type == R_RISCV_TLSDESC_LOAD_LO12 ||
-        type == R_RISCV_TLSDESC_ADD_LO12))) {
+  //
+  // Some RISCV TLSDESC relocations reference a local NOTYPE symbol, but we
+  // need to process them in handleTlsRelocation.
+  if (sym.isTls() || oneof<R_TLSDESC_PC, R_TLSDESC_CALL>(expr)) {
```

https://github.com/llvm/llvm-project/pull/85817
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to