mirror of
https://github.com/dynup/kpatch
synced 2025-03-07 03:07:49 +00:00
create-build-diff: support for .cold functions with no id suffix
create-build-diff expects .cold functions to be suffixed by an id, which is not always the case. Drop the trailing '.' when searching for cold functions. Fixes: #1160 Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
4dd3572ac5
commit
1b5a17f934
@ -100,7 +100,7 @@ static int is_bundleable(struct symbol *sym)
|
||||
if (sym->type == STT_FUNC &&
|
||||
!strncmp(sym->sec->name, ".text.unlikely.",15) &&
|
||||
(!strcmp(sym->sec->name + 15, sym->name) ||
|
||||
(strstr(sym->name, ".cold.") &&
|
||||
(strstr(sym->name, ".cold") &&
|
||||
!strncmp(sym->sec->name + 15, sym->name, strlen(sym->sec->name) - 15))))
|
||||
return 1;
|
||||
|
||||
@ -272,7 +272,7 @@ static void kpatch_detect_child_functions(struct kpatch_elf *kelf)
|
||||
if (sym->type != STT_FUNC)
|
||||
continue;
|
||||
|
||||
childstr = strstr(sym->name, ".cold.");
|
||||
childstr = strstr(sym->name, ".cold");
|
||||
if (childstr) {
|
||||
sym->parent = kpatch_lookup_parent(kelf, sym->name,
|
||||
childstr);
|
||||
|
Loading…
Reference in New Issue
Block a user