]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix build for ARMv5.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 24 Feb 2014 19:53:17 +0000 (06:53 +1100)
committerDave Cheney <dave@cheney.net>
Mon, 24 Feb 2014 19:53:17 +0000 (06:53 +1100)
Credit goes to Dave Cheney for debugging the issue.

LGTM=dave, rsc
R=dave, rsc
CC=golang-codereviews
https://golang.org/cl/67820043

src/cmd/ld/data.c

index 8c6cfed86275e63be209de96f00e8b301796e03a..8935621705f56bbe27f05dad4a51d686b34860bd 100644 (file)
@@ -343,7 +343,7 @@ dynrelocsym(LSym *s)
 
        for(r=s->r; r<s->r+s->nr; r++) {
                if(r->sym != S && r->sym->type == SDYNIMPORT || r->type >= 256) {
-                       if(!r->sym->reachable)
+                       if(r->sym != S && !r->sym->reachable)
                                diag("internal inconsistency: dynamic symbol %s is not reachable.", r->sym->name);
                        adddynrel(s, r);
                }