func (ctxt *Link) readImportCfg(file string) { … } func pkgname(ctxt *Link, lib string) string { … } func findlib(ctxt *Link, lib string) (string, bool) { … } func addlib(ctxt *Link, src, obj, lib string, fingerprint goobj.FingerprintType) *sym.Library { … } /* * add library to library list, return added library. * srcref: src file referring to package * objref: object file referring to package * file: object file, e.g., /home/rsc/go/pkg/container/vector.a * pkg: package import path, e.g. container/vector * shlib: path to shared library, or .shlibname file holding path * fingerprint: if not 0, expected fingerprint for import from srcref * fingerprint is 0 if the library is not imported (e.g. main) */ func addlibpath(ctxt *Link, srcref, objref, file, pkg, shlib string, fingerprint goobj.FingerprintType) *sym.Library { … } func atolwhex(s string) int64 { … } // PrepareAddmoduledata returns a symbol builder that target-specific // code can use to build up the linker-generated go.link.addmoduledata // function, along with the sym for runtime.addmoduledata itself. If // this function is not needed (for example in cases where we're // linking a module that contains the runtime) the returned builder // will be nil. func PrepareAddmoduledata(ctxt *Link) (*loader.SymbolBuilder, loader.Sym) { … }