llvm-project
edf21314 - [AArch64][v8.5A] Omit BTI for non-addr-taken static fns in ELF (#135043)

Commit
211 days ago
[AArch64][v8.5A] Omit BTI for non-addr-taken static fns in ELF (#135043) This follows up commit 7af2b51e761f499, which removed the BTI at the start of functions with internal linkage (provided they weren't indirectly called inside the translation unit) for Linux targets. Now we leave out the BTI for any ELF target, including bare-metal, because the AAELF64 document in the Arm ABI has been updated to make the same guarantee as SYSVABI64: if the linker wants to insert an indirect branch at link time (e.g. as part of a long branch thunk) it's responsible for making a BTI-equipped landing pad. That was too difficult to test in the existing codegen test `patchable-function-entry-bti.ll`, because so much of LLVM's detailed asm output changes for non-ELF targets. So I've simplified that back to how it was before 7af2b51e761f499 (except that now it expects no BTI in the disputed function), and made a new test checking specifically the difference in BTI between the formats.
Author
Parents
Loading