Skip to content

Commit 34ca59e

Browse files
committed
objtool: Fix ".cold" section suffix check for newer versions of GCC
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
1 parent 1f9a1b7 commit 34ca59e

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
@@ -846,8 +846,8 @@ static int add_jump_destinations(struct objtool_file *file)
846846
* case where the parent function's only reference to a
847847
* subfunction is through a jump table.
848848
*/
849-
if (!strstr(insn->func->name, ".cold.") &&
850-
strstr(insn->jump_dest->func->name, ".cold.")) {
849+
if (!strstr(insn->func->name, ".cold") &&
850+
strstr(insn->jump_dest->func->name, ".cold")) {
851851
insn->func->cfunc = insn->jump_dest->func;
852852
insn->jump_dest->func->pfunc = insn->func;
853853

0 commit comments

Comments
 (0)