* Jakub Cajka:
I have a feeling that we have had this discussion in the past. If
I'm
not mistaken then
https://golang.org/pkg/ is the stdlib(including
"runtime" package that enables interaction with runtime) and runtime
is separated part of a language/compiler/produced binary, i.e. it is
baked in to each binary it is not "public" lib in C sense and AFAIK
can't be linked in dynamically. For reference
https://golang.org/doc/faq#runtime . Hope I'm getting it right.
I expect that the garbage collector would be linked dynamically as well.
It should be easy enough to check by disassembling a dynamically linked
Go program. However, -linkshared does not currently work in Fedora 29
(after installing golang-shared):
$ go build -linkshared t.go
go build runtime/internal/atomic: open
/usr/lib/golang/pkg/linux_amd64_dynlink/runtime/internal/atomic.a: permission denied
go build internal/cpu: open /usr/lib/golang/pkg/linux_amd64_dynlink/internal/cpu.a:
permission denied
go build sync/atomic: open /usr/lib/golang/pkg/linux_amd64_dynlink/sync/atomic.a:
permission denied
go build runtime/cgo: open /usr/lib/golang/pkg/linux_amd64_dynlink/runtime/cgo.a:
permission denied
go build vendor/golang_org/x/crypto/curve25519: open
/usr/lib/golang/pkg/linux_amd64_dynlink/vendor/golang_org/x/crypto/curve25519.a:
permission denied
Thanks,
Florian