Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CgoEnabled = true
CgoEnabled is set to true if CGO is enabled.
var MinicoreEnabled = true
MinicoreEnabled is set to true by default. Build with -tags minicore_disabled to disable minicore at compile time. This is useful when building statically linked binaries, as minicore requires dynamic library loading (dlopen) which is incompatible with static linking.
Example: go build -tags minicore_disabled ./...
Functions ¶
This section is empty.
Types ¶
type LinkingMode ¶ added in v1.19.1
type LinkingMode int
LinkingMode describes what linking mode was detected for the current binary.
const ( // StaticLinking means the static linking. StaticLinking LinkingMode = iota // DynamicLinking means the dynamic linking. DynamicLinking // UnknownLinking means driver couldn't determine linking or it is not relevant (it is relevant on Linux only). UnknownLinking )
func CheckDynamicLinking ¶ added in v1.19.1
func CheckDynamicLinking() (LinkingMode, error)
CheckDynamicLinking checks whether the current binary has a dynamic linker (PT_INTERP). A statically linked glibc binary will crash with SIGFPE if dlopen is called, so this check allows us to skip minicore loading gracefully. The result is cached so the ELF parsing only happens once.
func (*LinkingMode) String ¶ added in v1.19.1
func (lm *LinkingMode) String() string