winows下golang编译流程

golang编译流程
go run xxx
go tool: no such tool “compile”
go tool: no such tool “asm”
go tool: no such tool “link”

go tool compile hello.go
go tool link hello.o

或者
C:\Go\pkg\tool\windows_amd64\compile.exe
C:\Go\pkg\tool\windows_amd64\link.exe hello.o

main.ctxt.loadlib()->loadlib->loadobjfile->ldobj->loadpe

ctxt.Out写文件

生成流程图

go-callvis github.com/syncthing/syncthing/cmd/syncthing | dot -Tpng -o syncthing.png

LEAVE A REPLY