"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cmd/link/internal/ld/lib.go" between
go1.16.4.src.tar.gz and go1.16.5.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language. Latest stable release (1.16).

lib.go  (go1.16.4.src):lib.go  (go1.16.5.src)
skipping to change at line 536 skipping to change at line 536
lib := ctxt.Library[i] lib := ctxt.Library[i]
if lib.Shlib == "" { if lib.Shlib == "" {
loadobjfile(ctxt, lib) loadobjfile(ctxt, lib)
} }
} }
// At this point, the Go objects are "preloaded". Not all the symbols are // At this point, the Go objects are "preloaded". Not all the symbols are
// added to the symbol table (only defined package symbols are). Looking // added to the symbol table (only defined package symbols are). Looking
// up symbol by name may not get expected result. // up symbol by name may not get expected result.
iscgo = ctxt.LibraryByPkg["runtime/cgo"] != nil iscgo = ctxt.LibraryByPkg["runtime/cgo"] != nil
ctxt.canUsePlugins = ctxt.LibraryByPkg["plugin"] != nil
// Plugins a require cgo support to function. Similarly, plugins may requ
ire additional
// internal linker support on some platforms which may not be implemented
.
ctxt.canUsePlugins = ctxt.LibraryByPkg["plugin"] != nil && iscgo
// We now have enough information to determine the link mode. // We now have enough information to determine the link mode.
determineLinkMode(ctxt) determineLinkMode(ctxt)
if ctxt.LinkMode == LinkExternal && !iscgo && !(objabi.GOOS == "darwin" & & ctxt.BuildMode != BuildModePlugin && ctxt.Arch.Family == sys.AMD64) { if ctxt.LinkMode == LinkExternal && !iscgo && !(objabi.GOOS == "darwin" & & ctxt.BuildMode != BuildModePlugin && ctxt.Arch.Family == sys.AMD64) {
// This indicates a user requested -linkmode=external. // This indicates a user requested -linkmode=external.
// The startup code uses an import of runtime/cgo to decide // The startup code uses an import of runtime/cgo to decide
// whether to initialize the TLS. So give it one. This could // whether to initialize the TLS. So give it one. This could
// be handled differently but it's an unusual case. // be handled differently but it's an unusual case.
if lib := loadinternal(ctxt, "runtime/cgo"); lib != nil && lib.Sh lib == "" { if lib := loadinternal(ctxt, "runtime/cgo"); lib != nil && lib.Sh lib == "" {
 End of changes. 1 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)