RPM macros that list arches the full kernel is built on
Go to file
Eugene Syromiatnikov cd7e9e8a2f 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-03-07 14:56:55 +01:00
.gitignore Initial build 2020-07-21 14:06:48 -07:00
brp-kmod-restore-perms Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
brp-kmod-set-exec-bit Enable extraction of debug information for kmods 2021-11-18 16:38:10 +01:00
find-provides.ksyms find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing 2023-03-07 14:56:55 +01:00
find-requires.ksyms find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing 2023-03-07 14:56:55 +01:00
firmware.prov Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
kabi.attr Re-instantiate support for old symvers path 2021-11-18 16:33:11 +01:00
kabi.sh Improve Provides: kernel() generation for built-in modules 2021-11-18 16:44:20 +01:00
kernel-srpm-macros.spec Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild 2023-01-19 14:22:32 +00:00
kmod.attr Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
kmodtool Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
macros.kernel-srpm Initial build 2020-07-21 14:06:48 -07:00
macros.kmp macros.kmp: remove kernel-abi-stablelists from the dependency list 2021-11-18 17:55:06 +01:00
modalias.attr Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
modalias.prov modalias.prov: stricter module aliase/version mangling 2021-11-18 16:44:20 +01:00
provided_ksyms.attr Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
README.md Added the README 2020-07-21 21:00:28 +00:00
required_ksyms.attr Add zstd kmod compression support 2021-11-18 16:44:20 +01:00
rpmsort rpmsort: update the FSF address 2021-11-18 16:44:20 +01:00
sources Initial build 2020-07-21 14:06:48 -07:00
symset-table Adopt kernel-rpm-macros subpackage from redhat-rpm-config 2021-06-03 17:21:53 +02:00

kernel-srpm-macros

The kernel-srpm-macros package