Skip to content

Commit

Permalink
[libcxxabi][ARM] Make CXX_end_cleanup compatible with Armv6-M
Browse files Browse the repository at this point in the history
On Armv6-M the branch may not able to reach the _Unwind_Resume function because it's relocation(R_ARM_THM_JUMP11) is in -2048, 2047 range only.

Reviewed By: chill, stuij, lenary

Differential Revision: https://reviews.llvm.org/D113181
  • Loading branch information
DanielKristofKiss committed Nov 4, 2021
1 parent d3dc7d0 commit 3255578
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcxxabi/src/cxa_exception.cpp
Expand Up @@ -382,7 +382,8 @@ asm(" .pushsection .text.__cxa_end_cleanup,\"ax\",%progbits\n"
" bl __cxa_end_cleanup_impl\n"
" pop {r1, r2, r3, r4}\n"
" mov lr, r4\n"
" b _Unwind_Resume\n"
" ldr r4, =_Unwind_Resume\n"
" bx r4\n"
" .popsection");
#endif // defined(_LIBCXXABI_ARM_EHABI)

Expand Down

0 comments on commit 3255578

Please sign in to comment.