Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
f5c99714
Unverified
Commit
f5c99714
authored
Apr 18, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example: minimal Go test program
parent
f54d09dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
.gitignore
.gitignore
+1
-0
Makefile
example/Makefile
+12
-0
go.mod
example/minimal/go.mod
+2
-0
main.go
example/minimal/main.go
+7
-0
No files found.
.gitignore
View file @
f5c99714
...
...
@@ -5,3 +5,4 @@ cache
venv
.idea
*.log
example/bin
example/Makefile
0 → 100644
View file @
f5c99714
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
example/minimal/go.mod
0 → 100644
View file @
f5c99714
module minimal
example/minimal/main.go
0 → 100644
View file @
f5c99714
package
main
import
"os"
func
main
()
{
_
,
_
=
os
.
Stdout
.
Write
([]
byte
(
"hello world!"
))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment