RPM macros that list arches the full kernel is built on
Go to file
Eugene Syromiatnikov fd79794323 find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing
Linux commit v5.19-rc1~139^2~2 ("kbuild: link symbol CRCs at final link,
removing CONFIG_MODULE_REL_CRCS") has broken the assumption aobut
the placement of non-absolute CRC symbols in .rodata (and also affects
the architectures that used to have these symbols as absolute);  rewrite
the parsing by utilising "objdump -t" output to figure out
the section(s) where the __crc_* symbols are stored and process
it instead of the hard-coded ".rodata" section.  The change also speeds
up the processing a bit, around 33% on synthetic tests:

    $ time sh -c 'find ./lib/modules/5.14.0-258.el9.ppc64le -name "*.ko.xz" | find-provides.ksyms.old > /dev/null 2> /dev/null'
    sh -c   10.36s user 5.58s system 137% cpu 11.613 total
    $ time sh -c 'find ./lib/modules/5.14.0-258.el9.ppc64le -name "*.ko.xz" | find-provides.ksyms.new > /dev/null 2> /dev/null'
    sh -c   7.82s user 4.59s system 142% cpu 8.686 total
    $ time sh -c 'find ./lib/modules/5.14.0-258.el9.ppc64le -name "*.ko.xz" -exec sh -c "echo {} | find-provides.ksyms.old" \; > /dev/null 2> /dev/null'
    sh -c   11.85s user 6.76s system 129% cpu 14.318 total
    $ time sh -c 'find ./lib/modules/5.14.0-258.el9.ppc64le -name "*.ko.xz" -exec sh -c "echo {} | find-provides.ksyms.new" \; > /dev/null 2> /dev/null'
    sh -c   8.91s user 5.51s system 135% cpu 10.647 total

* find-provides.ksyms: Process "objdump -t" output to get the list
of sections where __crc_* symbol contents are placed;  retrieve
each one with "readelf -R" and supply it to an awk script that cuts
the required part of it for each __crc_* symbol in that section.
* find-requires.ksyms (all_provides): Likewise.

Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Resolves: #2135047
2023-02-08 17:13:59 +01:00
.gitignore New branch setup 2020-10-08 15:57:43 +00:00
README.md RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:42:20 +02:00
brp-kmod-restore-perms Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
brp-kmod-set-exec-bit Enable extraction of debug information for kmods 2021-11-18 14:22:00 +01:00
find-provides.ksyms find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing 2023-02-08 17:13:59 +01:00
find-requires.ksyms find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing 2023-02-08 17:13:59 +01:00
firmware.prov Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
gating.yaml gating.yaml: switch to BaseOS CI 2022-02-17 05:06:21 +01:00
kabi.attr Re-instantiate support for old symvers path 2021-11-18 14:22:00 +01:00
kabi.sh Improve Provides: kernel() generation for built-in modules 2021-11-18 14:50:11 +01:00
kernel-srpm-macros.spec find-provides.ksyms, find-requires.ksyms: work around printed __crc_* type change 2022-02-17 04:41:45 +01:00
kmod.attr Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
kmodtool Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
macros.kernel-srpm RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:42:20 +02:00
macros.kmp Switch kmodtool-generated spec to internal dependency generator 2021-11-18 14:49:04 +01:00
modalias.attr Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
modalias.prov modalias.prov: stricter module aliase/version mangling 2021-11-18 14:50:11 +01:00
provided_ksyms.attr Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
required_ksyms.attr Add zstd kmod compression support 2021-11-18 14:50:11 +01:00
rpmsort rpmsort: update the FSF address 2021-11-18 14:50:11 +01:00
sources RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:42:20 +02:00
symset-table Adopt kernel-rpm-macros from redhat-rpm-config 2021-05-13 17:52:56 +02:00

README.md

kernel-srpm-macros

The kernel-srpm-macros package