[llvm] [JITLink] Support AArch64 big-endian (BE8) ELF objects (PR #225120)

dong jianqiang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 20:03:28 PDT 2026


================
@@ -316,11 +316,12 @@ Error lowerPointer64AuthEdgesToSigningFunction(LinkGraph &G) {
   auto &SigningFunctionBlock = SigningFunctionSym.getBlock();
   auto SigningFunctionBuf = SigningFunctionBlock.getAlreadyMutableContent();
 
-  // Write the instructions to the block content.
+  // Write the instructions to the block content. A64 instructions are always
+  // little-endian encoded regardless of the graph's data endianness (BE8).
   BinaryStreamWriter InstrWriter(
       {reinterpret_cast<uint8_t *>(SigningFunctionBuf.data()),
        SigningFunctionBuf.size()},
-      G.getEndianness());
+      llvm::endianness::little);
----------------
dongjianqiang2 wrote:

You're right – there are no BE-8 targets that support PAC. Pointer authentication is Apple's arm64e and always little-endian, and this pass is only installed by the MachO arm64e backend, so `G.getEndianness()` is already always `little` here. I've reverted that hunk to keep the diff focused on the templating.

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


More information about the llvm-commits mailing list