]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5c: fix dataflag annotation
authorShenghou Ma <minux.ma@gmail.com>
Tue, 25 Sep 2012 06:42:44 +0000 (14:42 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 25 Sep 2012 06:42:44 +0000 (14:42 +0800)
file        old_size     new_size    base@c1ce95068533
bin/go      14717392     6287824     5918236

this huge size difference is due to GC data for runtime.mheap
(NOPTR dataflag is not obeyed).

R=rsc, dave
CC=golang-dev
https://golang.org/cl/6547051

src/cmd/5c/txt.c

index 7738de1c308e451898e505b4d4e3d079d1f854e3..b8675fe60f9c915ea5ba8099d50ec50ce834ea7f 100644 (file)
@@ -1176,17 +1176,15 @@ patch(Prog *op, int32 pc)
 void
 gpseudo(int a, Sym *s, Node *n)
 {
-
        nextpc();
        p->as = a;
        p->from.type = D_OREG;
        p->from.sym = s;
        p->from.name = D_EXTERN;
-       if(a == ATEXT) {
+       if(a == ATEXT || a == AGLOBL) {
                p->reg = textflag;
                textflag = 0;
-       } else if(a == AGLOBL)
-               p->reg = 0;
+       }
        if(s->class == CSTATIC)
                p->from.name = D_STATIC;
        naddr(n, &p->to);