knz / go-binsize-viz

Size visualization of Go executables using D3
GNU Affero General Public License v3.0
470 stars 30 forks source link

unknown B sym format on Windows #2

Closed mappu closed 5 years ago

mappu commented 5 years ago

Hi! Super cool tool.

I am running this with Go 1.10 windows/amd64 from golang.org, and Python 3.6 from Cygwin64, on a mixed Go/C (CGO) binary, built with go build and nothing more (no -s -w etc).

Many such errors during tab2pydic.py pass: some representative ones

.
unknown D sym format: .CRT$XCA

unknown D sym format: .CRT$XCAA

unknown ? sym format: .file

unknown D sym format: .rsrc

unknown T sym format: .text

unknown B sym format: path/filepath.initdone·

unknown B sym format: reflect.initdone·
.
unknown B sym format: regexp.initdone·

unknown B sym format: regexp/syntax.initdone·

unknown T sym format: type.*
.
unknown B sym format: vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20.initdone·

unknown B sym format: vendor/golang_org/x/crypto/cryptobyte.initdone·

unknown B sym format: vendor/golang_org/x/net/http2/hpack.initdone·

Seems to mostly work aside from this, but the resulting visualisation has a large UNKNOWN section, i guess that's related?

image

knz commented 5 years ago

Thanks for your report! I made a change to include 'initdone·', please try it out.

mappu commented 5 years ago

Thanks! Just confirming that did make a big improvement.

Although it didn't seem to affect the tree visualisation in a any material way for my binary.

There are some remaining errors, but very little that points to Go/C code in a specific way.

tab2pydic_errors.log

knz commented 5 years ago

Could you attach the full output of go tool nm -size on your binary. I'd like to understand these formats more.