This follows up commit7af2b51e76, 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 before7af2b51e76(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.
3.1 KiB
3.1 KiB