[llvm] [PAC][CodeGen][ELF][AArch64] Support signed GOT (PR #105798)

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 02:13:32 PDT 2024


kovdan01 wrote:

The latest PR update fixes the following issue. With signed ELF GOT enabled, the linker looks at the symbol type to choose between keys IA (for STT_FUNC) and DA (for other types). Symbols for functions not defined in the module have STT_NOTYPE type by default. This makes linker to emit signing schema with DA key (instead of IA) for corresponding R_AARCH64_AUTH_GLOB_DAT dynamic reloc. To avoid that, force all function symbols used in the module to have STT_FUNC type. See https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#default-signing-schema

@MaskRay could you please clarify if this is OK from linker's perspective? Does lld rely on the fact that undefined functions are STT_NOTYPE or is this OK to have them STT_FUNC? I've ran test-suite built with pauth enabled (including signed GOT), and nothing seems to break, but maybe there are some non-obvious issues which might appear under some conditions.

Would be glad to see everyone's feedback on this @tmatheson-arm @smithp35 

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


More information about the llvm-commits mailing list