2021
06-05
06-05
golang 如何删除二进制文件中的源码路径信息
方法gov1.13gobuild新增-trimpath参数,不用以前那么麻烦了。➜awesomeProjectCGO_ENABLED=0gobuild-v-a-ldflags="-w-s"-trimpath\-o./hello_wordhello_word.go➜awesomeProjectstringshello_word|grepsrc➜awesomeProject#之前➜awesomeProjectgotoolobjdumphello_wordTEXTgo.buildid(SB).....TEXTmain.main(SB)/Users/xxxx/go/src/awesomeProject/hello_word.go...
继续阅读 >