Florian noticed that ld.so is shipped with several annobin symbols: $ rpm -q glibc glibc-2.34-42.fc35.x86_64 glibc-2.34-42.fc35.i686 $ eu-readelf -s /lib64/ld-linux-x86-64.so.2 | grep annobin | wc -l 1400 $ eu-readelf -s /lib64/ld-linux-x86-64.so.2 | wc -l 2104 $ Making sure that they are unnecessary, then stripping these should lead to some significant savings.
Nick, can we safely strip these?
(In reply to Arjun Shankar from comment #1) > Nick, can we safely strip these? Yes. (That was easy!) The symbols are used by the linker to compute regions of code covered by particular gcc command line options. This information is then stored in the annobin notes. Once the link has completed, the note information is fully resolved and the symbols are no longer needed.
(In reply to Nick Clifton from comment #2) > (In reply to Arjun Shankar from comment #1) > > Nick, can we safely strip these? > > Yes. > > (That was easy!) > > The symbols are used by the linker to compute regions of code covered by > particular gcc command line options. This information is then stored in the > annobin notes. Once the link has completed, the note information is fully > resolved and the symbols are no longer needed. Thanks, Nick. Could you recommend a strip command to achieve this? We want to preserve all other symbol and debugging information if possible.
(In reply to Florian Weimer from comment #3) > Thanks, Nick. Could you recommend a strip command to achieve this? We want > to preserve all other symbol and debugging information if possible. I can - although it takes two commands as strip does not have a regexp symbol name matcher: nm --format=just-symbols ld.so | grep annobin > remove-these-symbols objcopy --strip-symbols=remove-these-symbols ld.so ld.so.stripped
Thanks, Nick. Working on incorporating this into the package.
This needs a follow-up fix because there are no .annobin symbols on 32-bit Arm (because we disabled annobin there).
FEDORA-2022-12af0b08c8 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-12af0b08c8
FEDORA-2022-12af0b08c8 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-12af0b08c8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-12af0b08c8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-12af0b08c8 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.