File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -204,11 +204,11 @@ const interpose_substitution substitution_##func_name[] \
204204 ".type " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \
205205 ASM_TYPE_FUNCTION_STR "\n" \
206206 SANITIZER_STRINGIFY(TRAMPOLINE(func)) ":\n" \
207- SANITIZER_STRINGIFY(CFI_STARTPROC) "\n" \
207+ C_ASM_STARTPROC "\n" \
208208 C_ASM_TAIL_CALL(SANITIZER_STRINGIFY(TRAMPOLINE(func)), \
209209 "__interceptor_" \
210210 SANITIZER_STRINGIFY(ASM_PREEMPTIBLE_SYM(func))) "\n" \
211- SANITIZER_STRINGIFY(CFI_ENDPROC) "\n" \
211+ C_ASM_ENDPROC "\n" \
212212 ".size " SANITIZER_STRINGIFY(TRAMPOLINE(func)) ", " \
213213 ".-" SANITIZER_STRINGIFY(TRAMPOLINE(func)) "\n" \
214214 );
Original file line number Diff line number Diff line change 4242# define CFI_RESTORE (reg )
4343#endif
4444
45+ #if defined(__aarch64__) && defined(__ARM_FEATURE_BTI_DEFAULT)
46+ # define ASM_STARTPROC CFI_STARTPROC; hint #34
47+ # define C_ASM_STARTPROC SANITIZER_STRINGIFY (CFI_STARTPROC) "\nhint #34 "
48+ #else
49+ # define ASM_STARTPROC CFI_STARTPROC
50+ # define C_ASM_STARTPROC SANITIZER_STRINGIFY(CFI_STARTPROC)
51+ #endif
52+ #define ASM_ENDPROC CFI_ENDPROC
53+ #define C_ASM_ENDPROC SANITIZER_STRINGIFY(CFI_ENDPROC)
54+
4555#if defined(__x86_64__) || defined(__i386__) || defined(__sparc__)
4656# define ASM_TAIL_CALL jmp
4757#elif defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
114124 .globl __interceptor_trampoline_##name; \
115125 ASM_TYPE_FUNCTION(__interceptor_trampoline_##name); \
116126 __interceptor_trampoline_##name: \
117- CFI_STARTPROC ; \
127+ ASM_STARTPROC ; \
118128 ASM_TAIL_CALL ASM_PREEMPTIBLE_SYM(__interceptor_##name); \
119- CFI_ENDPROC ; \
129+ ASM_ENDPROC ; \
120130 ASM_SIZE(__interceptor_trampoline_##name)
121131# define ASM_INTERCEPTOR_TRAMPOLINE_SUPPORT 1
122132# endif // Architecture supports interceptor trampoline
You can’t perform that action at this time.
0 commit comments