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:
Seth Jennings 2014-05-23 16:32:17 -05:00
parent 4fb7930d34
commit 08dc2ae78c

View File

@ -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)