Is it safe to share a shared library after linking?

Suppose I got lib.so , I compile mySoft binary, and I link it to lib.so

At this point, given that everything is working as expected, is it safe or not to accept lib.so and split it into strip -s lib.so ?

To be clear, I am not interested in linking other binaries to my lib.so after mySoft is correctly generated, I am only interested in saving mySoft and getting some disk space and, possibly, a small margin in the performance conditions.

+4
source share
1 answer

Yes, it is safe. strip only removes characters that are not needed (because they are already connected). These characters are useful for debugging, but they are never needed just for code execution.

+7
source

Source: https://habr.com/ru/post/1444502/


All Articles