diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 7c08caf..e430a8d 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -90,7 +90,9 @@ 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)) + (!strcmp(sym->sec->name + 15, sym->name) || + (strstr(sym->name, ".cold.") && + !strncmp(sym->sec->name + 15, sym->name, strlen(sym->sec->name) - 15)))) return 1; if (sym->type == STT_OBJECT && @@ -823,6 +825,7 @@ static void kpatch_rename_mangled_functions(struct kpatch_elf *base, if (!strstr(sym->name, ".isra.") && !strstr(sym->name, ".constprop.") && + !strstr(sym->name, ".cold.") && !strstr(sym->name, ".part.")) continue; diff --git a/test/unit/objs b/test/unit/objs index 4fcbc2e..fbdc00d 160000 --- a/test/unit/objs +++ b/test/unit/objs @@ -1 +1 @@ -Subproject commit 4fcbc2e8c1256d3293cc53c3f3abaee62809e9fd +Subproject commit fbdc00d0c27742540628959bbefe0b6b82644775