Use adjustRelaxExpr for tls relaxations too.

This remove some EM_386 specific code from InputSection.cpp and opens
the way for more relaxations.

llvm-svn: 271814
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 5a13ef0..736e447 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -148,7 +148,8 @@
     // depending on the symbol being locally defined or not.
     if (isPreemptible(Body, Type)) {
       C.Relocations.push_back(
-          {R_RELAX_TLS_GD_TO_IE, Type, Offset, Addend, &Body});
+          {Target->adjustRelaxExpr(Type, nullptr, R_RELAX_TLS_GD_TO_IE), Type,
+           Offset, Addend, &Body});
       if (!Body.isInGot()) {
         Out<ELFT>::Got->addEntry(Body);
         Out<ELFT>::RelaDyn->addReloc({Target->TlsGotRel, Out<ELFT>::Got,
@@ -158,7 +159,8 @@
       return 2;
     }
     C.Relocations.push_back(
-        {R_RELAX_TLS_GD_TO_LE, Type, Offset, Addend, &Body});
+        {Target->adjustRelaxExpr(Type, nullptr, R_RELAX_TLS_GD_TO_LE), Type,
+         Offset, Addend, &Body});
     return Target->TlsGdRelaxSkip;
   }