kbuild: try readelf first in gen_symversions#1767
Conversation
deepin inclusion category: performance Instead of nm, readelf is more faster, and significantly improve build speed when enable CONFIG_GENKSYMS. Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSwitches gen_symversions in the kernel build system to prefer readelf over nm for extracting symbol information, aiming to improve build performance when CONFIG_GENKSYMS is enabled. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
it's suggested to try to send it upstream |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Avenger-285714 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR changes the export-symbol probe in gen_symversions from nm to readelf -sW to speed up builds when CONFIG_MODVERSIONS is enabled. The check runs once per compiled object that may export symbols, so using the faster readelf reduces overall build time.
Changes:
- Replace
$(NM) $@with$(READELF) -sW $@for the__export_symbol_probe in thegen_symversionshelper. - Drop the leading space from the
greppattern (sincereadelf -sWformats output differently thannm).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
deepin inclusion
category: performance
Instead of nm, readelf is more faster, and significantly improve build speed when enable CONFIG_GENKSYMS.
Summary by Sourcery
Enhancements: