]> Cypherpunks repositories - gostls13.git/commitdiff
ld: fix arm build
authorRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:42:11 +0000 (13:42 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:42:11 +0000 (13:42 -0400)
R=ken2
CC=golang-dev, mikkel
https://golang.org/cl/4384048

src/cmd/ld/data.c
src/cmd/ld/ldmacho.c

index 5b74971d8318fbdcda018dd6afbc84e9f070cb4d..5d7394463df86b4d8756f8a49c83ac65b68f6e84 100644 (file)
@@ -749,7 +749,7 @@ dodata(void)
        }
 
        for(s = datap; s != nil; s = s->next) {
-               if(s->np > 0 && s->type == SBSS && s->file != nil)      // TODO: necessary?
+               if(s->np > 0 && s->type == SBSS)
                        s->type = SDATA;
                if(s->np > s->size)
                        diag("%s: initialize bounds (%lld < %d)",
index ad275dca8cadb34a560fb1074a7f51688eb8b4a8..bbb21d51ae8815fce3f5c149efaab4a7433b03b7 100644 (file)
@@ -582,9 +582,10 @@ ldmacho(Biobuf *f, char *pkg, int64 len, char *pn)
                        else
                                s->type = SRODATA;
                } else {
-                       if (strcmp(sect->name, "__bss") == 0)
+                       if (strcmp(sect->name, "__bss") == 0) {
                                s->type = SBSS;
-                       else
+                               s->np = 0;
+                       } else
                                s->type = SDATA;
                }
                if(s->type == STEXT) {