]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
objtool: Fix weak symbol hole detection for .cold functions
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 17 Sep 2025 16:03:38 +0000 (09:03 -0700)
committerJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 14 Oct 2025 21:46:47 +0000 (14:46 -0700)
commitc9e9b85d41f9079d6a10faabf70a0b18d5c0f177
tree7a4e62234cdbec54f189c9a66b859c8b8614a7ed
parent4ea029389bf0cc44da6d3a24a520200e060ce6bf
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>
tools/objtool/check.c
tools/objtool/include/objtool/check.h