ld may insert stubs with indirect branch if the call target is out of reach for the direct call/branch instruction. In BTI enaled code two stubs should be inserted with the second one having a BTI and then direct branching to the original target. alternatively BTI-safe code could be required to have BTI at the start of each function that may be linker stub targets, but this would increase the generated BTIs. originally reported for gcc at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671
fixed at "bfd: aarch64: Fix stubs that may break BTI PR30076" https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=15b4f66b0a9a3be6caf1898d22a13c39e662006f and optimized at "bfd: aarch64: Optimize BTI stubs PR30076" https://sourceware.org/git?p=binutils-gdb.git;a=commit;h=5834f36d93cabf1a8bcc7dd7654141aed3d296bc