Merge pull request #1072 from jpoimboe/callback-strip-fix

create-diff-object: Don't strip callback section symbols
This commit is contained in:
Josh Poimboeuf 2020-02-18 14:43:31 -06:00 committed by GitHub
commit 40efb838cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}