diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-06-27 14:30:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-06-27 14:30:50 +0000 |
commit | 686208e0c954c5003b9af8f7edb0ab2c1bf242f5 (patch) | |
tree | f15c8fada37fb8ca063ad80e52ebe23cff495ced /sys/arch | |
parent | 2a14b9a66e51004850d71cdc11829fe5b650eee1 (diff) |
Let sigcode set up a frame such that the signal handler has something to
scribble its link register into.
Also, call exit(2) if sigreturn(2) returns (which should not happen).
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc64/powerpc64/locore.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/powerpc64/powerpc64/locore.S b/sys/arch/powerpc64/powerpc64/locore.S index 7c357f8677a..ec815a836e7 100644 --- a/sys/arch/powerpc64/powerpc64/locore.S +++ b/sys/arch/powerpc64/powerpc64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.22 2020/06/26 22:32:22 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.23 2020/06/27 14:30:49 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -30,13 +30,15 @@ .globl sigcode .globl sigcoderet sigcode: + addi %r1, %r1, -32 mtctr %r12 bctrl - addi %r3, %r1, SF_SC + addi %r3, %r1, 32+SF_SC li %r0, SYS_sigreturn sc sigcoderet: - blr + li %r0, SYS_exit + sc .globl esigcode esigcode: |