Skip to content

Commit 7ac2085

Browse files
committed
cmd/ld: fix scope of static objects in symbol table
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
1 parent bb195f6 commit 7ac2085

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cmd/ld/symtab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ putsymb(Sym *s, char *name, int t, vlong v, vlong size, int ver, Sym *typ)
347347

348348
// type byte
349349
if('A' <= t && t <= 'Z')
350-
c = t - 'A';
350+
c = t - 'A' + (ver ? 26 : 0);
351351
else if('a' <= t && t <= 'z')
352352
c = t - 'a' + 26;
353353
else {

0 commit comments

Comments
 (0)