Missing packed relative relocation support on aarch64, s390x (#2256645)

This commit is contained in:
Florian Weimer 2024-01-03 17:18:20 +01:00
parent 5fca01af52
commit 4daef93aa9
3 changed files with 9 additions and 4 deletions

View File

@ -643,7 +643,8 @@ to the compiler driver `gcc`, and not directly to the link editor
are essentially ignored due to this flag. are essentially ignored due to this flag.
* `-z pack-relative-relocs`: Use the portable `DT_RELR` scheme for * `-z pack-relative-relocs`: Use the portable `DT_RELR` scheme for
relative relocations, resulting in reduced startup time compared to relative relocations, resulting in reduced startup time compared to
legacy architecture-specific relocations. legacy architecture-specific relocations. (`-z pack-relative-relocs`
is currently disabled on aarch64 and s390x due to toolchain limitations.)
* `-z defs`: Refuse to link shared objects (DSOs) with undefined symbols * `-z defs`: Refuse to link shared objects (DSOs) with undefined symbols
(optional, see above). (optional, see above).

5
macros
View File

@ -372,8 +372,9 @@ for k,_ in pairs(stripped_flags) do print(k .. " ") end
%_ld_as_needed 1 %_ld_as_needed 1
%_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed} %_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed}
%_ld_pack_relocs 1 # aarch64 and s390x currently do not support packed relocations.
%_ld_pack_relocs_flags %{?_ld_pack_relocs:-Wl,-z,pack-relative-relocs} %_ld_pack_relocs %[ "%{_arch}" == "x86_64" || "%{_arch}" == "i386" || "%{_arch}" == "ppc64le" ]
%_ld_pack_relocs_flags %[0%{?_ld_pack_relocs} ? "-Wl,-z,pack-relative-relocs" : ""]
# LTO is the default in Fedora. # LTO is the default in Fedora.
# "%define _lto_cflags %{nil}" to opt out # "%define _lto_cflags %{nil}" to opt out

View File

@ -4,7 +4,7 @@
# 2) When making changes, increment the version (in baserelease) by 1. # 2) When making changes, increment the version (in baserelease) by 1.
# rpmdev-bumpspec and other tools update the macro below, which is used # rpmdev-bumpspec and other tools update the macro below, which is used
# in Version: to get the desired effect. # in Version: to get the desired effect.
%global baserelease 273 %global baserelease 274
Summary: Red Hat specific rpm configuration files Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config Name: redhat-rpm-config
@ -256,6 +256,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua
%doc buildflags.md %doc buildflags.md
%changelog %changelog
* Wed Jan 3 2024 Florian Weimer <fweimer@redhat.com> - 275-1
- Missing packed relative relocation support on aarch64, s390x (#2256645)
* Tue Jan 2 2024 Florian Weimer <fweimer@redhat.com> - 273-1 * Tue Jan 2 2024 Florian Weimer <fweimer@redhat.com> - 273-1
- Pack relative ELF relocations by default - Pack relative ELF relocations by default