Skip to content

Commit

Permalink
Merge pull request #5 from TG1999/add_readme_for_generating_binaries
Browse files Browse the repository at this point in the history
Add steps for generating binaries from mini go app
  • Loading branch information
pombredanne committed Feb 19, 2024
2 parents da069ff + 976edc3 commit fc737eb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ Go-Inspector
- then change it to executable ```chmod u+x src/go_inspector/bin/GoReSym_lin```
- Install requirements and dependencies using ```make dev```
- Use ```scancode --json-pp - --go-symbol <PATH> --verbose``` to get debug symbols.


How to generate test binaries
============================

- Run `go tool dist list` to get all possible pairs of OSes and arches to compile the binary.
- Then use a OS/arch pair like this ``GOOS=<OS> GOARCH=<arch> go build -o ./tests/data/app_exe ./tests/data/main.go``
to get compiled binary.
11 changes: 11 additions & 0 deletions tests/data/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import (
"fmt"
"path/filepath"
)

func main() {
s := filepath.Join("a", "b", "c")
fmt.Println(s)
}

0 comments on commit fc737eb

Please sign in to comment.