create-diff-object: consider '.L' symbols not static local

Make kpatch_is_normal_static_local() treat all symbols prefixed by '.L'
as not static locals.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2021-02-12 15:49:15 +01:00
parent fddc6242c6
commit b6e1d071ff

View File

@ -1168,18 +1168,21 @@ static struct symbol *kpatch_find_static_twin(struct section *sec,
return NULL;
}
static int kpatch_is_normal_static_local(struct symbol *sym)
static bool kpatch_is_normal_static_local(struct symbol *sym)
{
if (sym->type != STT_OBJECT || sym->bind != STB_LOCAL)
return 0;
return false;
if (!strncmp(sym->name, ".L", 2))
return false;
if (!strchr(sym->name, '.'))
return 0;
return false;
if (is_special_static(sym))
return 0;
return false;
return 1;
return true;
}
static struct rela *kpatch_find_static_twin_ref(struct section *rela_sec, struct symbol *sym)