/go-demo

go demo to descripe some knowledge of go

Primary LanguageGo

Demo

compile

# get importcfg source
go build -x -n -v *.go 2>&1 | sed  -n "/^# import config/,/EOF$/p" |grep -v EOF > importcfg
# this will generate xxx.o
go tool compile -N -l -importcfg importcfg xxx.go
# get the coomplie of xxx.go
go tool objdump xxxx.o >> xxx.txt