]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix SDYNIMPORT symbol test
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 2 May 2013 03:02:00 +0000 (13:02 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 2 May 2013 03:02:00 +0000 (13:02 +1000)
As advised by iant. Fixes windows build.

R=golang-dev, r
CC=golang-dev, iant
https://golang.org/cl/9110044

src/cmd/ld/lib.c

index 47a52b553c943daed12846105820da069130f2c0..0a6bd3e8f27dc77da3d06427ae283f53016152eb 100644 (file)
@@ -336,7 +336,7 @@ loadlib(void)
                                // cgo_import_static and cgo_import_dynamic,
                                // then we want to make it cgo_import_dynamic
                                // now.
-                               if(s->extname != nil && s->cgoexport == 0) {
+                               if(s->extname != nil && s->dynimplib != nil && s->cgoexport == 0) {
                                        s->type = SDYNIMPORT;
                                } else
                                        s->type = 0;