mirror of
https://github.com/golang/go
synced 2024-11-18 08:24:44 -07:00
undo CL 12193043 / cc5858966b08
Breaks all ELF builds. ««« original CL description cmd/ld: report pclntab, funcdata sizes in 6l -v output Also move chatty recent additions to -v -v. For what it's worth: $ go build -o /dev/null -ldflags -v cmd/godoc ... 0.73 pclntab=1259976 bytes, funcdata total 79788 bytes ... $ R=ken2 CC=cshapiro, golang-dev https://golang.org/cl/12193043 »»» R=rsc CC=golang-dev https://golang.org/cl/12202043
This commit is contained in:
parent
a05237f20a
commit
b08d0c2c62
@ -231,7 +231,7 @@ addlib(char *src, char *obj)
|
|||||||
if(p != nil)
|
if(p != nil)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
if(debug['v'] > 1)
|
if(debug['v'])
|
||||||
Bprint(&bso, "%5.2f addlib: %s %s pulls in %s\n", cputime(), obj, src, pname);
|
Bprint(&bso, "%5.2f addlib: %s %s pulls in %s\n", cputime(), obj, src, pname);
|
||||||
|
|
||||||
addlibpath(src, obj, pname, name);
|
addlibpath(src, obj, pname, name);
|
||||||
@ -330,7 +330,7 @@ loadlib(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i=0; i<libraryp; i++) {
|
for(i=0; i<libraryp; i++) {
|
||||||
if(debug['v'] > 1)
|
if(debug['v'])
|
||||||
Bprint(&bso, "%5.2f autolib: %s (from %s)\n", cputime(), library[i].file, library[i].objref);
|
Bprint(&bso, "%5.2f autolib: %s (from %s)\n", cputime(), library[i].file, library[i].objref);
|
||||||
iscgo |= strcmp(library[i].pkg, "runtime/cgo") == 0;
|
iscgo |= strcmp(library[i].pkg, "runtime/cgo") == 0;
|
||||||
objfile(library[i].file, library[i].pkg);
|
objfile(library[i].file, library[i].pkg);
|
||||||
@ -433,7 +433,7 @@ objfile(char *file, char *pkg)
|
|||||||
|
|
||||||
pkg = smprint("%i", pkg);
|
pkg = smprint("%i", pkg);
|
||||||
|
|
||||||
if(debug['v'] > 1)
|
if(debug['v'])
|
||||||
Bprint(&bso, "%5.2f ldobj: %s (%s)\n", cputime(), file, pkg);
|
Bprint(&bso, "%5.2f ldobj: %s (%s)\n", cputime(), file, pkg);
|
||||||
Bflush(&bso);
|
Bflush(&bso);
|
||||||
f = Bopen(file, 0);
|
f = Bopen(file, 0);
|
||||||
@ -2049,7 +2049,7 @@ genasmsym(void (*put)(Sym*, char*, int, vlong, vlong, int, Sym*))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(debug['v'] || debug['n'])
|
if(debug['v'] || debug['n'])
|
||||||
Bprint(&bso, "%5.2f symsize = %ud\n", cputime(), symsize);
|
Bprint(&bso, "symsize = %ud\n", symsize);
|
||||||
Bflush(&bso);
|
Bflush(&bso);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2356,9 +2356,7 @@ pclntab(void)
|
|||||||
uint32 *havepc, *havefunc;
|
uint32 *havepc, *havefunc;
|
||||||
Sym *ftab, *s;
|
Sym *ftab, *s;
|
||||||
int32 npcdata, nfuncdata, off, end;
|
int32 npcdata, nfuncdata, off, end;
|
||||||
int64 funcdata_bytes;
|
|
||||||
|
|
||||||
funcdata_bytes = 0;
|
|
||||||
ftab = lookup("pclntab", 0);
|
ftab = lookup("pclntab", 0);
|
||||||
ftab->type = SPCLNTAB;
|
ftab->type = SPCLNTAB;
|
||||||
ftab->reachable = 1;
|
ftab->reachable = 1;
|
||||||
@ -2480,15 +2478,10 @@ pclntab(void)
|
|||||||
i = p->from.offset;
|
i = p->from.offset;
|
||||||
if(p->to.type == D_CONST)
|
if(p->to.type == D_CONST)
|
||||||
setuintxx(ftab, off+PtrSize*i, p->to.offset, PtrSize);
|
setuintxx(ftab, off+PtrSize*i, p->to.offset, PtrSize);
|
||||||
else {
|
else
|
||||||
if(!p->to.sym->hide) {
|
|
||||||
funcdata_bytes += p->to.sym->size;
|
|
||||||
p->to.sym->hide = 1;
|
|
||||||
}
|
|
||||||
setaddrplus(ftab, off+PtrSize*i, p->to.sym, p->to.offset);
|
setaddrplus(ftab, off+PtrSize*i, p->to.sym, p->to.offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
off += nfuncdata*PtrSize;
|
off += nfuncdata*PtrSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2513,7 +2506,4 @@ pclntab(void)
|
|||||||
setuint32(ftab, start + s->value*4, ftabaddstring(ftab, s->name));
|
setuint32(ftab, start + s->value*4, ftabaddstring(ftab, s->name));
|
||||||
|
|
||||||
ftab->size = ftab->np;
|
ftab->size = ftab->np;
|
||||||
|
|
||||||
if(debug['v'])
|
|
||||||
Bprint(&bso, "%5.2f pclntab=%lld bytes, funcdata total %lld bytes\n", cputime(), (vlong)ftab->size, (vlong)funcdata_bytes);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user