mirror of
https://github.com/dynup/kpatch
synced 2024-12-13 00:44:34 +00:00
change matching criteria for NULL sym
Right now the matching criteria for the NULL sym is type LOCAL and shndx UNDEF. Unfortunately, that would also match any new LOCAL symbol added to the symbol table with uninit'd sym.* fields i.e. the upcoming __kpatch_strings and .kpatch.strings symbols. Change the matching criteria to be symbols that have a zero-length name; a property unique to the NULL sym. Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
4fb7930d34
commit
08dc2ae78c
@ -836,7 +836,7 @@ void kpatch_migrate_symbols(struct list_head *src,
|
||||
|
||||
int is_null_sym(struct symbol *sym)
|
||||
{
|
||||
return sym->bind == STB_LOCAL && sym->sym.st_shndx == SHN_UNDEF;
|
||||
return !strlen(sym->name);
|
||||
}
|
||||
|
||||
int is_file_sym(struct symbol *sym)
|
||||
|
Loading…
Reference in New Issue
Block a user