diff options
author | Russ Cox <rsc@golang.org> | 2009-02-05 13:58:43 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-02-05 13:58:43 -0800 |
commit | f80d2c3a5e0b57ef74a21cc3165c11c7da972e79 (patch) | |
tree | f83af29db8cdde596a364331b09816656a362bcb /src/cmd/6l/obj.c | |
parent | 7991b8d30c0d08478c56b9b0177c7ae4cd2a726b (diff) | |
download | golang-f80d2c3a5e0b57ef74a21cc3165c11c7da972e79.tar.gz |
heuristic to stop pulling .6 in from .a
is not right if the .6 is only for data and
the init function.
instead of that, pick up everything and
let the dead code/data eliminator throw
away the parts that weren't useful.
R=r
DELTA=25 (0 added, 22 deleted, 3 changed)
OCL=24446
CL=24446
Diffstat (limited to 'src/cmd/6l/obj.c')
-rw-r--r-- | src/cmd/6l/obj.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c index a23e030f5..b682ab1b1 100644 --- a/src/cmd/6l/obj.c +++ b/src/cmd/6l/obj.c @@ -368,7 +368,6 @@ main(int argc, char *argv[]) sprint(a, "%s/lib/lib_%s_%s.a", goroot, goarch, goos); objfile(a); } - ignoreoptfuncs(); definetypestrings(); definetypesigs(); deadcode(); @@ -950,11 +949,8 @@ loop: if(debug['W']) print(" ANAME %s\n", s->name); h[o] = s; - if((v == D_EXTERN || v == D_STATIC) && s->type == 0) { + if((v == D_EXTERN || v == D_STATIC) && s->type == 0) s->type = SXREF; - if(isinitfunc(s)) - s->type = SOPT; // optional function; don't pull in an object file just for s. - } if(v == D_FILE) { if(s->type != SFILE) { histgen++; @@ -1096,7 +1092,7 @@ loop: case ATEXT: s = p->from.sym; - if(ntext++ == 0 && s->type != 0 && s->type != SXREF && s->type != SOPT) { + if(ntext++ == 0 && s->type != 0 && s->type != SXREF) { /* redefinition, so file has probably been seen before */ if(debug['v']) Bprint(&bso, "skipping: %s: redefinition: %s", pn, s->name); @@ -1113,7 +1109,7 @@ loop: diag("%s: no TEXT symbol: %P", pn, p); errorexit(); } - if(s->type != 0 && s->type != SXREF && s->type != SOPT) { + if(s->type != 0 && s->type != SXREF) { if(p->from.scale & DUPOK) { skip = 1; goto casdef; |