[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)
Amy Kwan via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 21:01:16 PST 2024
================
@@ -116,6 +116,10 @@ std::pair<uint8_t, uint8_t> PPCXCOFFObjectWriter::getRelocTypeAndSignSize(
return {XCOFF::RelocationType::R_TLS_IE, SignAndSizeForFKData};
case MCSymbolRefExpr::VK_PPC_AIX_TLSLE:
return {XCOFF::RelocationType::R_TLS_LE, SignAndSizeForFKData};
+ case MCSymbolRefExpr::VK_PPC_AIX_TLSLD:
----------------
amy-kwan wrote:
I am wondering, maybe the `IsSigned` does not matter in this situation due to the above comment?
```
// People from AIX OS team says AIX link editor does not care about
// the sign bit in the relocation entry "most" of the time.
// The system assembler seems to set the sign bit on relocation entry
// based on similar property of IsPCRel. So we will do the same here.
// TODO: More investigation on how assembler decides to set the sign
// bit, and we might want to match that.
const uint8_t EncodedSignednessIndicator = IsPCRel ? SignBitMask : 0u;
```
https://github.com/llvm/llvm-project/pull/66316
More information about the cfe-commits
mailing list