diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 278d88a..23c2541 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -1570,9 +1570,10 @@ static int kpatch_include_callback_elements(struct kpatch_elf *kelf) } } - /* Strip temporary global structures used by the callback macros. */ + /* Strip temporary structure symbols used by the callback macros. */ list_for_each_entry(sym, &kelf->symbols, list) { - if (sym->sec && is_callback_section(sym->sec)) + if (sym->type == STT_OBJECT && sym->sec && + is_callback_section(sym->sec)) sym->include = 0; }