]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: fix scope of static objects in symbol table
authorAnthony Martin <ality@pbrane.org>
Thu, 11 Apr 2013 01:47:58 +0000 (18:47 -0700)
committerAnthony Martin <ality@pbrane.org>
Thu, 11 Apr 2013 01:47:58 +0000 (18:47 -0700)
All symbols are currently marked with global scope.
The correct behavior was lost when the symbol table
format was changed.

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

src/cmd/ld/symtab.c

index d8a4645e0d1c5ead707b93c5d0d6837a1c3d7dc3..01b92910e287dd9921cd3f385cce62a1687ed624 100644 (file)
@@ -347,7 +347,7 @@ putsymb(Sym *s, char *name, int t, vlong v, vlong size, int ver, Sym *typ)
        
        // type byte
        if('A' <= t && t <= 'Z')
-               c = t - 'A';
+               c = t - 'A' + (ver ? 26 : 0);
        else if('a' <= t && t <= 'z')
                c = t - 'a' + 26;
        else {