[lld] [PAC][ThinLTO] Fix auth key for GOT entries of function symbols (PR #131467)
Daniil Kovalev via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 06:51:26 PDT 2025
kovdan01 wrote:
> I wonder whether we could restrict the special behavior to AArch64 PAuth only.
I've added a check against AArch64 - see efaa9e2494b6bf593ed1a745b8937e5f1d5cdbf7.
As for check against PAuth - probably we can look through relocations, and if at least one AUTH GOT-generating relocation is present (`R_AARCH64_AUTH_LD64_GOT_LO12_NC`, `R_AARCH64_AUTH_GOT_ADD_LO12_NC`, `R_AARCH64_AUTH_GOT_LD_PREL19`, `R_AARCH64_AUTH_GOT_ADR_PREL_LO21`, `R_AARCH64_AUTH_ADR_GOT_PAGE`), we enable this special logic (because the whole point of this is specifying correct auth key for AUTH GOT entry).
@MaskRay Please let me know if such a check for PAuth looks OK for you.
Probably, in future we could rely on build attributes section, but, as far as I understand, this is not currently supported in lld (please correct me if I'm wrong).
https://github.com/llvm/llvm-project/pull/131467
More information about the llvm-commits
mailing list