[lld] [PAC][ThinLTO] Fix auth key for GOT entries of function symbols (PR #131467)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 20:59:12 PDT 2025


MaskRay wrote:

This is somewhat unusual, as we typically don’t track the type of undefined symbols. The subject could likely be clarified to refer specifically to undefined symbols.

I see how this happens.  When the module flag "ptrauth-elf-got" is set, llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp sets the function symbol `MCSA_ELF_TypeFunction` (translates to ELF STT_FUNC). The description could be clarified.
`elfSym.getName(obj->getStringTable())` is wasteful - as we could zip `obj->template getGlobalELFSyms<ELFT>()` with `obj->getGlobalSymbols()`. I wonder whether we could restrict the special behavior to AArch64 PAuth only.

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


More information about the llvm-commits mailing list