modpost: fix RISC-V randconfig section mismatch false positives
Get series with b4
b4 am [email protected] change-id 20260716-modpost-30d5d28d9d64Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | modpost: ignore generated GCOV and RISC-V local relocsscripts/ | +71 | 0 replies | |
| 2/2 | modpost: handle RISC-V relative extable relocationsscripts/ | +79 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] modpost: fix RISC-V randconfig section mismatch false positives
This series fixes two modpost false-positive section mismatch cases seen with RISC-V randconfig builds.
The first patch filters compiler-generated GCOV symbols and RISC-V local branch/PC-relative relocations when they point at init or exit sections. These references can come from instrumentation or local compiler/linker details rather than from real kernel section lifetime dependencies.
The second patch handles RISC-V relative exception table entries as R_RISCV_ADD32/R_RISCV_SUB32 relocation pairs. modpost already skipped the SUB32 half, but still checked the ADD32 symbol directly. After a relocatable link, that symbol can name an unrelated local debug symbol and trigger false .debug* section mismatch diagnostics from these __ex_table relocation pairs.
The issues are reproducible with both GCC 14 and GCC 15. They were reproduced or validated with:
- rv32 randconfig, KCONFIG_SEED=277518, CONFIG_GCOV_PROFILE_ALL=y, CONFIG_KCOV_INSTRUMENT_ALL=y, CONFIG_DEBUG_INFO_BTF=y
- rv32 randconfig, KCONFIG_SEED=4721,
CONFIG_MMU=y, CONFIG_DEBUG_INFO=y
With the fixes applied, the corresponding RISC-V randconfig builds complete successfully. Other unrelated modpost warnings may still remain.
---
Jia Wang (2):
modpost: ignore generated GCOV and RISC-V local relocs
modpost: handle RISC-V relative extable relocations
scripts/mod/modpost.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 150 insertions(+), 7 deletions(-)
---
base-commit: 58717b2a1365d06c8c64b72aa948541b53fe31eb
change-id: 20260716-modpost-30d5d28d9d64
Best regards,
Signature · 1 line
Jia Wang <[email protected]>