Skip to content

Commit c41fc75

Browse files
jpoimboegregkh
authored andcommitted
objtool: Fix ".cold" section suffix check for newer versions of GCC
[ Upstream commit 34ca59e ] With my version of GCC 9.3.1 the ".cold" subfunctions no longer have a numbered suffix, so the trailing period is no longer there. Presumably this doesn't yet trigger a user-visible bug since most of the subfunction detection logic is duplicated. I only found it when testing vmlinux.o validation. Fixes: 54262aa ("objtool: Fix sibling call detection") Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/ca0b5a57f08a2fbb48538dd915cc253b5edabb40.1611263461.git.jpoimboe@redhat.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7631376 commit c41fc75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tools/objtool/check.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ static int add_jump_destinations(struct objtool_file *file)
850850
* case where the parent function's only reference to a
851851
* subfunction is through a jump table.
852852
*/
853-
if (!strstr(insn->func->name, ".cold.") &&
854-
strstr(insn->jump_dest->func->name, ".cold.")) {
853+
if (!strstr(insn->func->name, ".cold") &&
854+
strstr(insn->jump_dest->func->name, ".cold")) {
855855
insn->func->cfunc = insn->jump_dest->func;
856856
insn->jump_dest->func->pfunc = insn->func;
857857

0 commit comments

Comments
 (0)