[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

Amy Kwan via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 21:09:04 PDT 2023


================
@@ -757,6 +772,17 @@ getTOCEntryTypeForMO(const MachineOperand &MO) {
     llvm_unreachable("Unexpected operand type to get TOC type.");
   }
 }
+
+// FIXME: find alternative approach to get rid of this hack.
+// On AIX, TLS-local-dynamic requires that the symbol for the module handle must
+// have the name "_$TLSML". This symbol is used as one TOC symbol reference
+// itself with an ML relocation type, thus it has "[TC]" attached to its name.
----------------
amy-kwan wrote:

```suggestion
// FIXME: find an alternative approach to get rid of this hack.
// On AIX, TLS-local-dynamic requires that the symbol for the module handle must
// have the name "_$TLSML". This symbol is used as one TOC symbol reference
// with an @ml relocation specifier, thus it has "[TC]" attached to its name.
```
Maybe this makes a bit more sense?

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


More information about the cfe-commits mailing list