Commit f5c99714 authored by protolambda's avatar protolambda

example: minimal Go test program

parent f54d09dc
......@@ -5,3 +5,4 @@ cache
venv
.idea
*.log
example/bin
bin:
mkdir bin
bin/minimal.elf: bin
cd minimal && GOOS=linux GOARCH=mips GOMIPS=softfloat go build -o ../bin/minimal.elf .
# verify output with: readelf -h bin/minimal.elf
# result is mips32, big endian, R3000
bin/minimal.dump: bin/minimal.elf
# TODO: currently have the little-endian toolchain, but should use the big-endian one. The -EB compat flag works though.
mipsel-linux-gnu-objdump -D --disassembler-options=no-aliases --wide --source -m mips:3000 -EB bin/minimal.elf > bin/minimal.dump
package main
import "os"
func main() {
_, _ = os.Stdout.Write([]byte("hello world!"))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment