Commit a26c01ad authored by Russ Cox's avatar Russ Cox

cmd/cc: emit gc bitmaps in read-only memory

Cuts hello world by 70kB, because we don't write
those names into the symbol table.

Update #6853

LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/80370045
parent b8851ad7
......@@ -51,6 +51,7 @@ makefuncdatasym(char *namefmt, int64 funcdatakind)
nod.sym = sym;
nod.class = CSTATIC;
gins(AFUNCDATA, nodconst(funcdatakind), &nod);
linksym(sym)->type = SRODATA;
return sym;
}
......
......@@ -425,7 +425,7 @@ symtab(void)
s->hide = 1;
s->outer = symgofunc;
}
if(strstr(s->name, ".gcargs·") != nil || strstr(s->name, ".gclocals·") != nil || strncmp(s->name, "gcargs·", 8) == 0 || strncmp(s->name, "gclocals·", 10) == 0) {
if(strncmp(s->name, "gcargs.", 7) == 0 || strncmp(s->name, "gclocals.", 9) == 0 || strncmp(s->name, "gclocals·", 10) == 0) {
s->type = SGOFUNC;
s->hide = 1;
s->outer = symgofunc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment