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
d746c69a
Unverified
Commit
d746c69a
authored
Apr 28, 2023
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example: rename minimal program to hello
parent
e2b59c2c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
Makefile
example/Makefile
+5
-5
go.mod
example/hello/go.mod
+2
-0
main.go
example/hello/main.go
+0
-0
go.mod
example/minimal/go.mod
+0
-2
evm_test.go
mipsevm/evm_test.go
+2
-2
state_test.go
mipsevm/state_test.go
+2
-2
No files found.
example/Makefile
View file @
d746c69a
...
...
@@ -2,11 +2,11 @@
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
bin/
hello
.elf
:
bin
cd
hello
&&
GOOS
=
linux
GOARCH
=
mips
GOMIPS
=
softfloat go build
-o
../bin/hello
.elf .
# verify output with: readelf -h bin/
hello
.elf
# result is mips32, big endian, R3000
bin/
minimal.dump
:
bin/minimal
.elf
bin/
hello.dump
:
bin/hello
.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
mipsel-linux-gnu-objdump
-D
--disassembler-options
=
no-aliases
--wide
--source
-m
mips:3000
-EB
bin/
hello.elf
>
bin/hello
.dump
example/hello/go.mod
0 → 100644
View file @
d746c69a
module hello
example/
minimal
/main.go
→
example/
hello
/main.go
View file @
d746c69a
File moved
example/minimal/go.mod
deleted
100644 → 0
View file @
e2b59c2c
module minimal
mipsevm/evm_test.go
View file @
d746c69a
...
...
@@ -107,7 +107,7 @@ func TestEVM(t *testing.T) {
}
}
func
Test
Minimal
EVM
(
t
*
testing
.
T
)
{
func
Test
Hello
EVM
(
t
*
testing
.
T
)
{
contracts
,
err
:=
LoadContracts
()
require
.
NoError
(
t
,
err
)
...
...
@@ -120,7 +120,7 @@ func TestMinimalEVM(t *testing.T) {
}
sender
:=
common
.
Address
{
0x13
,
0x37
}
elfProgram
,
err
:=
elf
.
Open
(
"../example/bin/
minimal
.elf"
)
elfProgram
,
err
:=
elf
.
Open
(
"../example/bin/
hello
.elf"
)
require
.
NoError
(
t
,
err
,
"open ELF file"
)
state
,
err
:=
LoadELF
(
elfProgram
)
...
...
mipsevm/state_test.go
View file @
d746c69a
...
...
@@ -76,8 +76,8 @@ func TestState(t *testing.T) {
}
}
func
Test
Minimal
(
t
*
testing
.
T
)
{
elfProgram
,
err
:=
elf
.
Open
(
"../example/bin/
minimal
.elf"
)
func
Test
Hello
(
t
*
testing
.
T
)
{
elfProgram
,
err
:=
elf
.
Open
(
"../example/bin/
hello
.elf"
)
require
.
NoError
(
t
,
err
,
"open ELF file"
)
state
,
err
:=
LoadELF
(
elfProgram
)
...
...
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