diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 3ce22017cfe..8784e9d38f1 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -1006,7 +1006,7 @@ func hostlink() { argv = append(argv, "-shared") } - if Linkshared && Iself { + if Iself && DynlinkingGo() { // We force all symbol resolution to be done at program startup // because lazy PLT resolution can use large amounts of stack at // times we cannot allow it to do so.