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