]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix windows build
authorRuss Cox <rsc@golang.org>
Fri, 1 Mar 2013 13:03:25 +0000 (05:03 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 1 Mar 2013 13:03:25 +0000 (05:03 -0800)
Fixes #4948.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/7445045

src/cmd/ld/ldpe.c
src/run.bat

index f41827befda6f9f1037e6a8e289ebdb8b43c0a6e..39c15e6a14e6c5505c9870c71520c91213419188 100644 (file)
@@ -320,12 +320,6 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn)
                        goto bad;
        
                s = sym->sym;
-               if(s->outer != S) {
-                       if(s->dupok)
-                               continue;
-                       diag("%s: duplicate symbol reference: %s in both %s and %s", pn, s->name, s->outer->name, sect->sym->name);
-                       errorexit();
-               }
                if(sym->sectnum == 0) {// extern
                        if(s->type == SDYNIMPORT)
                                s->plt = -2; // flag for dynimport in PE object files.
@@ -344,6 +338,13 @@ ldpe(Biobuf *f, char *pkg, int64 len, char *pn)
 
                if(sect == nil) 
                        return;
+
+               if(s->outer != S) {
+                       if(s->dupok)
+                               continue;
+                       diag("%s: duplicate symbol reference: %s in both %s and %s", pn, s->name, s->outer->name, sect->sym->name);
+                       errorexit();
+               }
                s->sub = sect->sym->sub;
                sect->sym->sub = s;
                s->type = sect->sym->type | SSUB;
index 945cce4262e48911b5f2914679596d7dbd720907..3f950f5414becdda53f0dd83c3aff8b663a79ef4 100644 (file)
@@ -54,8 +54,6 @@ echo.
 
 if not "%GOHOSTOS%-%GOOS%-%GOARCH%-%CGO_ENABLED%" == "windows-windows-amd64-1" goto norace
 echo # Testing race detector.
-echo # skipping test due to bug (http://code.google.com/p/go/issues/detail?id=4948).
-goto norace
 go test -race -i flag
 if errorlevel 1 goto fail
 go test -race -short flag