Skip to content

Commit

Permalink
handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujhd committed Feb 18, 2020
1 parent 745e5b6 commit 499d1eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ func main() {
reloc, err := goloader.ReadObjs(files.File, files.PkgPath)
if err != nil {
fmt.Println(err)
return
}

var mmapByte []byte
for i := 0; i < *times; i++ {
codeModule, err := goloader.Load(reloc, symPtr)
if err != nil {
fmt.Println("Load error:", err)
return
}
runFuncPtr := codeModule.Syms[*run]
if runFuncPtr == 0 {
Expand Down

0 comments on commit 499d1eb

Please sign in to comment.