summaryrefslogtreecommitdiff
path: root/src/cmd/gc/obj.c
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-03-04 21:27:36 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-04 21:27:36 +0100
commit04b08da9af0c450d645ab7389d1467308cfc2db8 (patch)
treedb247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/cmd/gc/obj.c
parent917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff)
downloadgolang-04b08da9af0c450d645ab7389d1467308cfc2db8.tar.gz
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/cmd/gc/obj.c')
-rw-r--r--src/cmd/gc/obj.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cmd/gc/obj.c b/src/cmd/gc/obj.c
index e45b4e0d4..b87d35b7b 100644
--- a/src/cmd/gc/obj.c
+++ b/src/cmd/gc/obj.c
@@ -59,7 +59,13 @@ dumpglobls(void)
continue;
dowidth(n->type);
- ggloblnod(n, n->type->width);
+ ggloblnod(n);
+ }
+
+ for(l=funcsyms; l; l=l->next) {
+ n = l->n;
+ dsymptr(n->sym, 0, n->sym->def->shortname->sym, 0);
+ ggloblsym(n->sym, widthptr, 1, 1);
}
}
@@ -302,8 +308,8 @@ stringsym(char *s, int len)
off = 0;
// string header
- off = dsymptr(sym, off, sym, widthptr+4);
- off = duint32(sym, off, len);
+ off = dsymptr(sym, off, sym, widthptr+widthint);
+ off = duintxx(sym, off, len, widthint);
// string data
for(n=0; n<len; n+=m) {
@@ -314,7 +320,7 @@ stringsym(char *s, int len)
}
off = duint8(sym, off, 0); // terminating NUL for runtime
off = (off+widthptr-1)&~(widthptr-1); // round to pointer alignment
- ggloblsym(sym, off, 1);
+ ggloblsym(sym, off, 1, 1);
return sym;
}