[llvm] [JITLink] Support AArch64 big-endian (BE8) ELF objects (PR #225120)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 18:49:19 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);
----------------
lhames wrote:
Has this been tested? Are there any BE-8 targets that support PAC?
I ask because this change seems to conflict with this comment:
> ... In BE8 mode instructions remain little-endian (the A64 ISA is word-invariant)
https://github.com/llvm/llvm-project/pull/225120
More information about the llvm-commits
mailing list