Open shufps opened 3 years ago
This is planned.
Ok, so the problem with .rodata
is that its content is not defined. Only the app itself during execution knows what data is what. So we cannot "index" it beforehand without relying on disassembling, which is far from trivial.
Is this where debuginfo is stored? I just cut down a test binary's size from ~450MB to ~60MB by setting profile.dev.debug = 0
in Cargo.toml
, would have been nice if cargo bloat
had told me before that it was such a huge part of the binary.
FWIW, with --symbols-section .rodata
and a patch to binfarce for it not to filter out STT_FUNC
symbols in https://github.com/Shnatsel/binfarce/blob/ff619127bd1400d3589fec0ff067b4edb3b45d9c/src/elf64.rs#L247-L252, you can get useful results, like in https://github.com/unicode-rs/unicode-normalization/pull/86#issuecomment-1164910121
@glandium are you sure this is enough? It might help a bit in case of ELF, but still not a general solution.
It's not enough, but it's already helpful. I've seen cases where [unknown] stays high, though.
I have troubles finding where this insane amount of
.rodata
is coming from ...Would be great, if
cargo bloat
also could support eg rodata :)