[lld] [lld] Add target support for SystemZ (s390x) (PR #75643)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 12:31:17 PST 2023


================
@@ -1357,8 +1357,8 @@ static unsigned handleTlsRelocation(RelType type, Symbol &sym,
             R_LOONGARCH_GOT_PAGE_PC, R_GOT_OFF, R_TLSIE_HINT>(expr)) {
     ctx.hasTlsIe.store(true, std::memory_order_relaxed);
     // Initial-Exec relocs can be relaxed to Local-Exec if the symbol is locally
-    // defined.
-    if (toExecRelax && isLocalInExecutable) {
+    // defined.  This is not supported on SystemZ.
+    if (toExecRelax && isLocalInExecutable && config->emachine != EM_S390) {
----------------
uweigand wrote:

But that would disable *all* the relaxations.  We do have Local-Dynamic to Local-Exec and Gobal-Dynamic to Initial/Local-Exec.  We just cannot do Initial-Exec to Local-Exec relaxation.

https://github.com/llvm/llvm-project/pull/75643


More information about the llvm-commits mailing list