File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ _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
+ bti c
21
22
stp x29 , x30 , [ sp , - 16 ] !
22
23
mov x29 , sp
23
24
blr x3
@@ -53,3 +54,20 @@ _Py_trampoline_func_end:
53
54
. align 8
54
55
4 :
55
56
#endif // __x86_64__
57
+ #if defined(__aarch64__) && defined(__AARCH64EL__) && !defined(__ILP32__) \
58
+ && defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1
59
+ .pushsection .note.gnu.property , "a"
60
+ . align 3
61
+ . word 2f - 1f
62
+ . word 4f - 3f
63
+ . word 5 / * NT_GNU_PROPERTY_TYPE_0 * /
64
+ 1 : .asciz "GNU"
65
+
66
+ 2 : .align 3
67
+ 3 : .word 0xc0000000 / * type: GNU_PROPERTY_AARCH64_FEATURE_1_AND * /
68
+ . word 6f - 5f / * size * /
69
+ 5 : .word 1 / * value: GNU_PROPERTY_AARCH64_FEATURE_1_BTI * /
70
+
71
+ 6 : .align 3
72
+ 4 : .popsection
73
+ #endif
You can’t perform that action at this time.
0 commit comments