[PATCH] Link startup files without package-metadata
Florian Weimer
fweimer@redhat.com
Mon Feb 23 14:51:51 GMT 2026
* Dimitri Ledkov:
> On my todo list is to investigate/prototype all the things with both
> strip and objcopy to see if there are any issues to report to the
> binutils project. Also will continue to investigate the status of
> rpmspecs and build options in fedora, to see if things are on there
> and how. And then likely do a recommendation to update the
> https://github.com/systemd/package-notes
>
> Whilst my patch might not be the solution, I still think things could
> be more automatic / better in the glibc upstream, which avoids every
> distributor manually performing the same build system fix ups. As
> ideally I want to make it easy for everyone to universally enable
> package notes without needing to juggle how to do it right for glibc
> or other complex projects (for example grub bios builds).
With the package-notes fix:
commit 060c35dce74be3dd134cdae4731629e22e6b47ca
Author: Frédéric Bérat <fberat@redhat.com>
Date: Tue Jan 27 11:31:16 2026 +0100
rpm: use a '%{!r: ... }' guard around package notes LDFLAGS
...to prevent double inclusion when performing a relocatable link ('-r').
Relates to https://bugzilla.redhat.com/show_bug.cgi?id=2362272.
we don't need any build system changes for our Fedora builds.
> Even looking at fedora spec file it seems more complicated than
> necessary—three LDFLAGS are passed to the build system, in addition to
> spec file based hardening:
> https://src.fedoraproject.org/rpms/glibc/blob/rawhide/f/glibc.spec#_1390
>
> I want these things to be safer and more consistent, with better
> observability and propagation than is currently achieved by all glibc
> distributors.
Fedora's approach is a bit of an outlier among distributions: We ship
with upstream defaults for hardening flags, but override the defaults
for ABI compatibility (no longer necessary these days because all Fedora
architectures enable asynchronous unwind tables in upstream GCC by
default) and ISA level (still required).
Thanks,
Florian
More information about the Libc-alpha
mailing list