I'm working on a project that uses a lot of templates and libraries like boost:: fusion and found myself struggling with an executable that, as of today, is 600MB and gdb needs 1.7 GB of memory to just load it, and a symbol lookup would make it use nearly 3GBs.. The stripped binary is about 5 MBs.
The question is, is there anything to be done in order to generate smaller debug symbols? This is not only a problem with gdb but also with the linker, which uses another 1.2 GB of RAM when linking objects compiled with the -g flag
I've tried -g1 -g2 and -g3 and the problem remains the same.
is there anything to be done in order to generate smaller debug symbols?
You can use GNU gold linker with --compress-debug-sections=zlib
option instead of default ld linker to compress output debug symbols. Gdb supports compressed debug sections since 7.0 version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With