Skip to content

runtime: illegal instruction on mipsel (mipsle) platform #18880

@Baozisoftware

Description

@Baozisoftware

What version of Go are you using (go version)?

go1.8rc3.linux-amd64
DL:https://storage.googleapis.com/golang/go1.8rc3.linux-amd64.tar.gz

What operating system and processor architecture are you using (go env)?

All use default.

What did you do?

1.Create a test.go:

package main

import (
	"fmt"
)

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

2.Buid to mipsle:

GOARCH=mipsle go build test.go

3.use "file test" output:

test: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped

4.Copy the file to OpenWrt router(kernel:4.4.14):
---cat /proc/cpuinfo---

system type		: MediaTek MT7620A ver:2 eco:6
machine			: OY-0001
processor		: 0
cpu model		: MIPS 24KEc V5.0
BogoMIPS		: 398.13
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: yes




hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available
system type		: MediaTek MT7620A ver:2 eco:6
machine			: OY-0001
processor		: 0
cpu model		: MIPS 24KEc V5.0
BogoMIPS		: 398.13
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16 dsp
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

5.use "test" in router output:
Illegal instruction

What did you expect to see?

output:
Hello world!

What did you see instead?

output:
Illegal instruction

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions