News for hackers. Stuff that matters.
Re:How to make smaller C and C++ binaries by ghotli on Sunday May 07, 2023 @04:54PM (#35855523)
I spent a lot of time with bloaty for our embedded application and found I had more actionable output from something like this...

nm -B -l -r --size-sort --print-size -t d ./path/to/compiler/output{.so} | c++filt > /tmp/by_size

Just a lot of flags that show you size by symbol in decimal with unmangled symbols. Run it before you run `strip` in your CI pipeline or whatever preps a build for proper release.

Re:How to make smaller C and C++ binaries by menaerus on Monday May 08, 2023 @04:55AM (#35859524)
I agree, bloaty seems to be good in giving a good (and quick) overview but the difficult part is drilling through the symbols to find out what the heck is happening. In that case nm/objdump/readelf are irreplaceable.