From aeb43984ec7c86aee220cc56146e0127de4ce2e3 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Sat, 21 Jun 2008 15:36:23 -0700 Subject: add signal handling and traceback support therein. factor the runtime into architecture-dependent and -independent pieces. ditto for the OS dependence. SVN=124020 --- src/runtime/rt0_amd64_linux.s | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/runtime/rt0_amd64_linux.s') diff --git a/src/runtime/rt0_amd64_linux.s b/src/runtime/rt0_amd64_linux.s index 6ad8b33d55..27064a48bc 100644 --- a/src/runtime/rt0_amd64_linux.s +++ b/src/runtime/rt0_amd64_linux.s @@ -52,6 +52,25 @@ TEXT sys_write(SB),1,$-8 CALL notok(SB) RET +TEXT sys_rt_sigaction(SB),1,$-8 + MOVL 8(SP), DI + MOVQ 16(SP), SI + MOVQ 24(SP), DX + MOVQ 32(SP), CX + MOVL CX, R10 + MOVL $13, AX // syscall entry + SYSCALL + JCC 2(PC) + CALL notok(SB) + RET + +TEXT sigtramp(SB),1,$24 + MOVQ DI,0(SP) + MOVQ SI,8(SP) + MOVQ DX,16(SP) + CALL sighandler(SB) + RET + TEXT sys_breakpoint(SB),1,$-8 BYTE $0xcc RET -- cgit v1.3-5-g9baa