Similar to D81251 for AArch64 BTI. This fixes ./a.out test for
void foo(void) {} void bar(void) {} static void (*fptr)(void); int main(int argc, char **argv) { if (argv[1]) fptr = foo; else fptr = bar; fptr(); }
clang -flto=thin -fvisibility=hidden -fsanitize=cfi-icall -fcf-protection=branch -fuse-ld=lld a.cc
Why is this needed only in the endbr case?