c++gcc.aobjcopy

How to move gcc debug symbols outside from .so and .a files?


as far as I know, objcopy is able to move debug symbols (compiled with -g flag) outside from an executable binary. I found this question, but there are only generic methods for symbol outsourcing.

But what can I do when my executable is using some really large .so and .a files?

I would like to profile my application in a small environment where is not enough place for the debug symbols. The entire project was built with -g option. The debug symbols are needed later only when the profile log is processed.


Solution

  • You can strip debug symbols:

    strip --strip-debug object.so