From: Artem Savkov Date: Wed, 13 Jun 2018 08:18:50 +0000 (+0200) Subject: create-diff-object: add .text.hot to the list of bundleable functions X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=acd4e478bd8a8ea1f2ec41e26f02e6b74ad43cd3;p=livepatch-build-tools.git create-diff-object: add .text.hot to the list of bundleable functions According to gcc8's man pages gcc can put functions into .text.unlikely or .text.hot subfunctions during optimization. Add ".text.hot" to the list of bundleable functions in is_bundleable(). Signed-off-by: Artem Savkov Signed-off-by: Roger Pau Monné Reviewed-by: Ross Lagerwall --- diff --git a/common.c b/common.c index 84ca14d..b46fcf5 100644 --- a/common.c +++ b/common.c @@ -131,6 +131,11 @@ static int is_bundleable(struct symbol *sym) !strncmp(sym->sec->name + 15, sym->name, strlen(sym->sec->name) - 15)))) return 1; + if (sym->type == STT_FUNC && + !strncmp(sym->sec->name, ".text.hot.",10) && + !strcmp(sym->sec->name + 10, sym->name)) + return 1; + if (sym->type == STT_OBJECT && !strncmp(sym->sec->name, ".data.",6) && !strcmp(sym->sec->name + 6, sym->name))