go install -buildmode=shared std
go build -linkshared hi.go
ll -h hi hii
16K Jun 19 02:39 hi*
2.0M Jun 19 02:43 hii*
readelf -x .interp hi
Hex dump of section '.interp':
0x00400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-
0x00400248 7838362d 36342e73 6f2e3200 x86-64.so.2.
readelf -x .interp hii
Warning: Section '.interp' was not dumped because it does not exist!
readelf -x .interp `which ls`
Hex dump of section '.interp':
0x00400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-
0x00400248 7838362d 36342e73 6f2e3200 x86-64.so.2.
参考:
有疑问加站长微信联系(非本文作者)