summaryrefslogtreecommitdiff
path: root/tools/objtool/include
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2025-09-17 09:03:38 -0700
committerJosh Poimboeuf <jpoimboe@kernel.org>2025-10-14 14:46:47 -0700
commitc9e9b85d41f9079d6a10faabf70a0b18d5c0f177 (patch)
tree7a4e62234cdbec54f189c9a66b859c8b8614a7ed /tools/objtool/include
parent4ea029389bf0cc44da6d3a24a520200e060ce6bf (diff)
objtool: Fix weak symbol hole detection for .cold functions
When ignore_unreachable_insn() looks for weak function holes which jump to their .cold functions, it assumes the parent function comes before the corresponding .cold function in the symbol table. That's not necessarily the case with -ffunction-sections. Mark all the holes beforehand (including .cold functions) so the ordering of the discovery doesn't matter. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/include')
-rw-r--r--tools/objtool/include/objtool/check.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/include/objtool/check.h b/tools/objtool/include/objtool/check.h
index 00fb745e7233..0f4e7ac929ef 100644
--- a/tools/objtool/include/objtool/check.h
+++ b/tools/objtool/include/objtool/check.h
@@ -64,7 +64,8 @@ struct instruction {
noendbr : 1,
unret : 1,
visited : 4,
- no_reloc : 1;
+ no_reloc : 1,
+ hole : 1;
/* 10 bit hole */
struct alt_group *alt_group;