diff --git a/misc/cgo/testplugin/testdata/host/host.go b/misc/cgo/testplugin/testdata/host/host.go index d836523da8..a3799328cd 100644 --- a/misc/cgo/testplugin/testdata/host/host.go +++ b/misc/cgo/testplugin/testdata/host/host.go @@ -145,13 +145,12 @@ func main() { } _, err = plugin.Open("plugin-mismatch.so") - // TODO: newobj - //if err == nil { - // log.Fatal(`plugin.Open("plugin-mismatch.so"): should have failed`) - //} - //if s := err.Error(); !strings.Contains(s, "different version") { - // log.Fatalf(`plugin.Open("plugin-mismatch.so"): error does not mention "different version": %v`, s) - //} + if err == nil { + log.Fatal(`plugin.Open("plugin-mismatch.so"): should have failed`) + } + if s := err.Error(); !strings.Contains(s, "different version") { + log.Fatalf(`plugin.Open("plugin-mismatch.so"): error does not mention "different version": %v`, s) + } _, err = plugin.Open("plugin2-dup.so") if err == nil { diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 063bdded0c..63dcb22d98 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -816,7 +816,7 @@ func genhash(ctxt *Link, lib *sym.Library) { return } h.Write(pkgDefBytes[0:firstEOL]) - //h.Write(pkgDefBytes[firstDoubleDollar : firstDoubleDollar+secondDoubleDollar]) // TODO: newobj: -dynlink may change symbol numbering? which will make the export data differ + h.Write(pkgDefBytes[firstDoubleDollar : firstDoubleDollar+secondDoubleDollar]) lib.Hash = hex.EncodeToString(h.Sum(nil)) }