Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWhat is the difference between `external linking` and `internal linking` program, and how do I make a choice between them? #35579
Comments
This comment has been minimized.
This comment has been minimized.
The Go project doesn't use the issue tracker for questions. You will get better and faster answers on a forum. Please see https://golang.org/wiki/Questions. Thanks. External linking means that the final link is done using the system linker. Internal linking means that the final link is done using the Go linker. Most people shouldn't need to choose between them. If this doesn't help, I suggest that you use a forum to ask your real question. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
not test
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/.gvm/pkgsets/go1.12.4/global"
GOPROXY="https://goproxy.cn"
GORACE=""
GOROOT="/root/.gvm/gos/go1.12.4"
GOTMPDIR=""
GOTOOLDIR="/root/.gvm/gos/go1.12.4/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/opt/sghproxy/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build427518459=/tmp/go-build -gno-record-gcc-switches"
go env
OutputWhat did you do?
What did you expect to see?
Well, I think they are very nearly the same between
client-s
andclient-s2
.What did you see instead?
Actually you could see that the size between
client-s
andclient-s2
are large, so what is the difference betweenexternal linking
andinternal linking
for the static linking program?And how do I make a choice between them?
By the way, I could only use
internal linking
onmacOS15.1
.Any help would be greatly appreciated.