ago. While there, fix the SYS_exit syscall. The syscall number is passed in
r12, not as the argument of the syscall instruction.
ok deraadt@
-/* $OpenBSD: sigcode.S,v 1.10 2020/10/19 17:57:40 naddy Exp $ */
+/* $OpenBSD: sigcode.S,v 1.11 2021/06/28 18:21:08 kettenis Exp $ */
/* $NetBSD: sigcode.S,v 1.6 2003/10/05 19:44:58 matt Exp $ */
/*
/* mov r0, sp */
add r0, sp, #SIGF_SC
mov r12, #SYS_sigreturn
- swi SYS_sigreturn
- nop
- nop
+ swi 0
+ dsb nsh
+ isb
.globl _C_LABEL(sigcoderet)
_C_LABEL(sigcoderet):
/* Well if that failed we better exit quick ! */
- swi SYS_exit
- nop
- nop
-
- .align 2
+ mov r12, #SYS_exit
+ swi 0
+ dsb nsh
+ isb
.global _C_LABEL(esigcode)
_C_LABEL(esigcode):