Dear All,
We are happy to provide the very first proof-of-concept branch of LLVM+clang+runtime libraries that includes pointer authentication support for ELF targets.
Everything is based on top of downstream branch by @ahmedbougacha with ELF support patches on top as well as some bug fixes.
There is also a patch for MUSL that adds support for pauth ELF relocations: [AArch64] Add initial support for PAC relocs by eleviant · Pull Request #1 · access-softek/musl · GitHub
We verified that LLVM testsuite compiled with pauth successfully passes on pauth-enabled AArch64 board.
Notes and known issues:
- There is some code generation instability (different, albeit correct, code is generation on Linux and Mac hosts)
- Complete LLDB support is currently WIP. For now stack tracing, etc. only works until the first signed pointers
- Some things are not yet decided / implemented (e.g. emission of
.note
sections, when / how one would check them inside dynamic loader, etc.). - Relocation numbers are used from the still unmerged AArch64 ELF ABI pull request: [AAELF64][PAUTHABI64] Assign PAuthABI relocation codes. by smithp35 · Pull Request #227 · ARM-software/abi-aa · GitHub
Eventually all patches will be a part of LLVM mainline, however, there are some roadblocks that need to be broken. Please let us know if there are any issues, etc. with the code provided.