go编译mips无法运行!

./qemu-mips ./main
fatal error: sigaction failed

runtime stack:
runtime.throw(0xd5584, 0x10)
    /usr/local/go/src/runtime/panic.go:608 +0x60
runtime.sysSigaction.func1()
    /usr/local/go/src/runtime/os_linux.go:432 +0x48
runtime.sysSigaction(0x41, 0x40800054, 0x0)
    /usr/local/go/src/runtime/os_linux.go:431 +0x88
runtime.sigaction(0x41, 0x40800054, 0x0)
    /usr/local/go/src/runtime/sigaction.go:15 +0x28
runtime.setsig(0x41, 0x54110)
    /usr/local/go/src/runtime/os_linux.go:382 +0xfc
runtime.initsig(0xd8c)
    /usr/local/go/src/runtime/signal_unix.go:113 +0x1c8
runtime.mstartm0()
    /usr/local/go/src/runtime/proc.go:1309 +0x58
runtime.mstart1()
    /usr/local/go/src/runtime/proc.go:1278 +0x12c
runtime.mstart()
    /usr/local/go/src/runtime/proc.go:1248 +0x68

goroutine 1 [runnable]:
runtime.main()
    /usr/local/go/src/runtime/proc.go:110
runtime.goexit()
    /usr/local/go/src/runtime/asm_mipsx.s:660 +0x4
    package main


源码
package main
import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

编译
env GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build ./main.go
版本信息
go version go1.11.5 linux/386


- 不管是用qemu模拟运行还是放到开发板上都不行,只有mips版本的(大小尾端都试过)无法运行,arm 386都能正常运行。

共 0 个回复