packaging
packaging copied to clipboard
Strip citus.so .comment .note sections
We have some unstripped-binary-or-object
warnings in OL/7, and possibly for some other distros as well.
citus-enterprise93_11.x86_64: W: unstripped-binary-or-object /usr/pgsql-11/lib/citus.so
Debian-policy includes a section about this:
All installed shared libraries should be stripped with
strip --strip-unneeded --remove-section=.comment --remove-section=.note your-lib
(The option --strip-unneeded makes strip remove only the symbols which aren’t needed for relocation processing.) Shared libraries can function perfectly well when stripped, since the symbols for dynamic linking are in a separate part of the ELF object file.
Note that under some circumstances it may be useful to install a shared library unstripped, for example when building a separate package to support debugging. The debhelper dh_strip` tool can create such packages automatically.