If libraries are built with debug information, you can remove this with 'strip' but perhaps even better would be to do: $ objcopy --only-keep-debug libfoo.so libfoo.so.debug $ objcopy --strip-debug libfoo.so $ objcopy --add-gnu-debuglink=libfoo.so.debug libfoo.so to separate the two.