user1797612 user1797612 - 1 year ago 79
C++ Question

Is it safe to strip a shared library after linking?

Let's suppose that I got
, I compile the binary
and I link this to

At this point, considering that everything is working as expected, It's safe or not to take
and strip it with
strip -s

To be clear I'm not interested on linking other binaries to my
is properly generated, I'm only interested on keep
working and gain some disk space and maybe a small edge in terms of performances.

Answer Source

Yes, it's safe. strip only removes symbols that are not needed (because they have already been linked). Those symbols are useful for debugging, but they are never needed just for executing the code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download