[ARM][libcxxabi] Add PACBTI-M support to libcxxabi

This change consists of just adding 'BTI' to the prologue of Arm assembly
functions, which is just the one: __cxa_end_cleanup

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension

The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:

https://developer.arm.com/documentation/ddi0553/latest

The following people contributed to this patch:

- Mikhail Maltsev

Reviewed By: lenary, danielkiss

Differential Revision: https://reviews.llvm.org/D112432
This commit is contained in:
Ties Stuij
2021-12-10 09:36:19 +00:00
parent 1aa59ff2f7
commit 69faae2376

View File

@@ -378,6 +378,9 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n"
" .globl __cxa_end_cleanup\n"
" .type __cxa_end_cleanup,%function\n"
"__cxa_end_cleanup:\n"
#if defined(__ARM_FEATURE_BTI_DEFAULT)
" bti\n"
#endif
" push {r1, r2, r3, lr}\n"
" bl __cxa_end_cleanup_impl\n"
" pop {r1, r2, r3, r4}\n"