Merge pull request #856 from sm00th/unlikely-cold

create-diff-object: ignore .cold.* suffixes in is_bundleable()
This commit is contained in:
Josh Poimboeuf 2018-05-31 09:25:28 -05:00 committed by GitHub
commit a7c413d4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

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

@ -1 +1 @@
Subproject commit 4fcbc2e8c1256d3293cc53c3f3abaee62809e9fd
Subproject commit fbdc00d0c27742540628959bbefe0b6b82644775