Failure to analyze when the symbol table is disabled on darwin/arm64/go 1.22/cgo
A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.
Brought to you by:
zxilly
Originally posted by: Zxilly
Do you compile with the target darwin-arm64? If so this is an known issue.
https://github.com/Zxilly/go-size-analyzer/blob/master/scripts/skip.txt
Originally posted by: Zxilly
A temporary workaround is to keep the symbol table, and the dwarf can be removed as it didn't be used right now.
Originally posted by: nikpivkin
Yes, the target is darwin-arm64. Why does this work with CGO_ENABLED=0?
Originally posted by: Zxilly
CGO implicitly enables external links, where links are no longer executed by go, but by the linker provided by the operating system. This will change some of the assumptions of go itself.
Currently this problem only occurs with darwin-arm64 on go 1.22, and I don't use Apple's M-series chips, so it's hard for me to find out exactly what's wrong.
Originally posted by: nikpivkin
I got it, thanks.
Originally posted by: nikpivkin
@Zxilly I can provide dumps if it can help. I've been trying to research this, but I haven't gotten too far.
Originally posted by: Zxilly
It's an error triggered by an upstream library, and I'm sure it's fixable. And I already have some samples I can use to reproduce the error.
But I'm busy lately. Maybe I'll have time to look at this in a few months.
You can follow https://github.com/goretk/gore for progress.