File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,18 @@ _Py_trampoline_func_start:
18
18
#if defined(__aarch64__) && defined(__AARCH64EL__) && !defined(__ILP32__)
19
19
// ARM64 little endian , 64bit ABI
20
20
// generate with aarch64 - linux - gnu - gcc 12 . 1
21
+ #if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT & 1 ) == 1 || \
22
+ defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1
23
+ hint 25
24
+ #endif
21
25
stp x29 , x30 , [ sp , - 16 ] !
22
26
mov x29 , sp
23
27
blr x3
24
28
ldp x29 , x30 , [ sp ], 16
29
+ #if defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT & 1 ) == 1 || \
30
+ defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1
31
+ hint 29
32
+ #endif
25
33
ret
26
34
#endif
27
35
#ifdef __riscv
@@ -53,3 +61,22 @@ _Py_trampoline_func_end:
53
61
. align 8
54
62
4 :
55
63
#endif // __x86_64__
64
+ #if defined(__aarch64__) && defined(__AARCH64EL__) && !defined(__ILP32__)
65
+ #if defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1 ||
66
+ defined(__ARM_FEATURE_PAC_DEFAULT) && (__ARM_FEATURE_PAC_DEFAULT & 1 ) == 1
67
+ .pushsection .note.gnu.property , "a"
68
+ . align 3
69
+ . word 2f - 1f
70
+ . word 4f - 3f
71
+ . word 5 / * NT_GNU_PROPERTY_TYPE_0 * /
72
+ 1 : .asciz "GNU"
73
+
74
+ 2 : .align 3
75
+ 3 : .word 0xc0000000 / * type: GNU_PROPERTY_AARCH64_FEATURE_1_AND * /
76
+ . word 6f - 5f / * size * /
77
+ 5 : .word 3 / * value: GNU_PROPERTY_AARCH64_FEATURE_1_BTI * /
78
+
79
+ 6 : .align 3
80
+ 4 : .popsection
81
+ #endif
82
+ #endif
You can’t perform that action at this time.
0 commit comments