]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
objtool: Remove second pass of .cold function correlation
authorJosh Poimboeuf <jpoimboe@kernel.org>
Thu, 20 Nov 2025 20:52:20 +0000 (12:52 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 21 Nov 2025 09:04:08 +0000 (10:04 +0100)
commit106f11d43be53156187270d00c83ddf5ef3f6ac6
tree9c5722776bfb6e1e9fde11ab1b5582ff225ce2ed
parenta91a61b290430ba0dd2c42378f744d6b21657f42
objtool: Remove second pass of .cold function correlation

The .cold function parent/child correlation logic has two passes: one in
read_symbols() and one in add_jump_destinations().

The second pass was added with commit cd77849a69cf ("objtool: Fix GCC 8
cold subfunction detection for aliased functions") to ensure that if the
parent symbol had aliases then the canonical symbol was chosen as the
parent.

That solution was rather clunky, not to mention incomplete due to the
existence of alternatives and switch tables.  Now that we have
sym->alias, the canonical alias fix can be done much simpler in the
first pass, making the second pass obsolete.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/bdab245a38000a5407f663a031f39e14c67a43d4.1763671318.git.jpoimboe@kernel.org
tools/objtool/check.c
tools/objtool/elf.c