diff --git a/plan9/asm_plan9_amd64.s b/plan9/asm_plan9_amd64.s deleted file mode 100644 index d3448e675..000000000 --- a/plan9/asm_plan9_amd64.s +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -// -// System call support for amd64, Plan 9 -// - -// Just jump to package syscall's implementation for all these functions. -// The runtime may know about them. - -TEXT ·Syscall(SB),NOSPLIT,$0-64 - JMP syscall·Syscall(SB) - -TEXT ·Syscall6(SB),NOSPLIT,$0-88 - JMP syscall·Syscall6(SB) - -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 - JMP syscall·RawSyscall(SB) - -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 - JMP syscall·RawSyscall6(SB) - -TEXT ·seek(SB),NOSPLIT,$0-56 - JMP syscall·seek(SB) - -TEXT ·exit(SB),NOSPLIT,$8-8 - JMP syscall·exit(SB) diff --git a/plan9/syscall_plan9.go b/plan9/syscall_plan9.go index 761912237..a04574f38 100644 --- a/plan9/syscall_plan9.go +++ b/plan9/syscall_plan9.go @@ -13,6 +13,7 @@ package plan9 import ( "bytes" + "os" "syscall" "unsafe" ) @@ -61,10 +62,10 @@ func errstr() string { return cstring(buf[:]) } -// Implemented in assembly to import from runtime. -func exit(code int) - -func Exit(code int) { exit(code) } +// Exit causes the current process to exit with the given status code. +// Previously implemented in assembly referencing syscall.exit, which does +// not exist on Plan 9, causing build failures on plan9/amd64. +func Exit(code int) { os.Exit(code) } func readnum(path string) (uint, error) { var b [12]byte