Skip to content

kpatch-build: ignore gendwarfksyms and export_symbol local symbols - #1521

Merged
jpoimboe merged 1 commit into
dynup:masterfrom
laoar:fix_618
Sep 4, 2026
Merged

kpatch-build: ignore gendwarfksyms and export_symbol local symbols#1521
jpoimboe merged 1 commit into
dynup:masterfrom
laoar:fix_618

Conversation

@laoar

@laoar laoar commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

kpatch-build: ignore gendwarfksyms and export_symbol local symbols

Kernel v6.18 introduced two new families of local symbols that are generated in each object file but discarded during the final link of vmlinux:

  • _export_symbol: generated by the .export_symbol section of the reworked EXPORT_SYMBOL() macro (include/linux/export.h)
  • _gendwarfksyms_ptr: generated when CONFIG_GENDWARFKSYMS=y to force DWARF emission for exported symbols

Because these symbols only exist in per-object files and are absent from the vmlinux symbol table, create-diff-object's find_local_syms() fails to match them when comparing the patched object's local symbols against the parent symbol table, e.g.:

create-diff-object: ERROR: mm/vmscan.o: find_local_syms: 219:
couldn't find matching vmscan.c local symbols in vmlinux symbol table

Add them to maybe_discarded_sym() so they are skipped when comparing local symbol tables.

kpatch-build: ignore gendwarfksyms and export_symbol local symbols

Kernel v6.18 introduced two new families of local symbols that are
generated in each object file but discarded during the final link of
vmlinux:

  - __export_symbol_<name>: generated by the .export_symbol section
    of the reworked EXPORT_SYMBOL() macro (include/linux/export.h)
  - __gendwarfksyms_ptr_<name>: generated when CONFIG_GENDWARFKSYMS=y
    to force DWARF emission for exported symbols

Because these symbols only exist in per-object files and are absent
from the vmlinux symbol table, create-diff-object's find_local_syms()
fails to match them when comparing the patched object's local symbols
against the parent symbol table, e.g.:

  create-diff-object: ERROR: mm/vmscan.o: find_local_syms: 219:
  couldn't find matching vmscan.c local symbols in vmlinux symbol table

Add them to maybe_discarded_sym() so they are skipped when comparing
local symbol tables.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
@jpoimboe
jpoimboe merged commit cc622a5 into dynup:master Sep 4, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants