I have been working on a private RPM for a Rust based program and noticed that the RPM strip scripts are not reducing the binaries files like when I execute strip directly on those binaries.

The first thing I checked is the brp-strip script. This one is filtering executables where "file" reports it is a "shared object", Rust binaries are marked as "ELF 64-bit LSB shared object" instead of "ELF 64-bit LSB executable". My understating of this after a few web searches is that this is for security features like PIE and ASLR.

brp-strip-shared runs "strip --strip-unneeded" but brp-strip run "strip" (no arguments). Is there a reason why binaries marked as "ELF 64-bit LSB shared object" should not be fully stripped?

For example "ls" can be smaller that it currently is

161896 ls          (from Fedora RPM)
150008 ls-full     (after strip)
150008 ls-unneeded (after strip --strip-unneeded)
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to