[PATCH 5/7] create-diff-object: add .text.hot to the list of bundleable functions

Roger Pau Monne posted 7 patches 2 weeks, 5 days ago
[PATCH 5/7] create-diff-object: add .text.hot to the list of bundleable functions
Posted by Roger Pau Monne 2 weeks, 5 days ago
From: Artem Savkov <asavkov@redhat.com>

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 <asavkov@redhat.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 common.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common.c b/common.c
index 84ca14d3e397..b46fcf5cb6ca 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))
-- 
2.46.0