1 // This program makes a multi tier nested function call to test AArch64
2 // Pointer Authentication feature.
4 // To enable PAC return address signing compile with following clang arguments:
5 // -march=armv8.3-a -mbranch-protection=pac-ret+leaf
9 static void __attribute__((noinline
)) func_c(void) {
10 exit(0); // Frame func_c
13 static void __attribute__((noinline
)) func_b(void) {
14 func_c(); // Frame func_b
17 static void __attribute__((noinline
)) func_a(void) {
18 func_b(); // Frame func_a
21 int main(int argc
, char *argv
[]) {
22 func_a(); // Frame main