From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99DA3C433E9 for ; Thu, 14 Jan 2021 19:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EA182399C for ; Thu, 14 Jan 2021 19:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730098AbhANTmI (ORCPT ); Thu, 14 Jan 2021 14:42:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45362 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729108AbhANTmH (ORCPT ); Thu, 14 Jan 2021 14:42:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610653241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5c3L4bYrLhZL5OwOyI939GNyjck2m6pGMD4sS/JoR5s=; b=XpAh8nrJpEsIuuYDg9pdsjAj6ssF6wJ4MKpDO9Ongndd7PRWFTEXejxqqG2yWvMS3X2dFp 7Loj+Cmtbj7FTuPJEfXLlh/QH1n6ppGIpWilwt/XHvtJtBUMVDge0Wq/UqrdjS5ieRh826 lFAHiu1T+cbz+AcszQYerJizXrwMpFI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-NtGuaEGLOWuUjzF4GKUjqA-1; Thu, 14 Jan 2021 14:40:37 -0500 X-MC-Unique: NtGuaEGLOWuUjzF4GKUjqA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CAFDD107ACF7; Thu, 14 Jan 2021 19:40:35 +0000 (UTC) Received: from treble.redhat.com (ovpn-120-156.rdu2.redhat.com [10.10.120.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F7321001E73; Thu, 14 Jan 2021 19:40:31 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Sami Tolvanen , Sedat Dilek , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, Miroslav Benes Subject: [PATCH 04/21] objtool: Fix ".cold" section suffix check for newer versions of GCC Date: Thu, 14 Jan 2021 13:40:00 -0600 Message-Id: <93bcd631c50ea58faad9edee4ad675c57bb0f934.1610652862.git.jpoimboe@redhat.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 54262aa28301 ("objtool: Fix sibling call detection") Signed-off-by: Josh Poimboeuf --- tools/objtool/check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 00969eac5f7b..12d48db41626 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -850,8 +850,8 @@ static int add_jump_destinations(struct objtool_file *file) * case where the parent function's only reference to a * subfunction is through a jump table. */ - if (!strstr(insn->func->name, ".cold.") && - strstr(insn->jump_dest->func->name, ".cold.")) { + if (!strstr(insn->func->name, ".cold") && + strstr(insn->jump_dest->func->name, ".cold")) { insn->func->cfunc = insn->jump_dest->func; insn->jump_dest->func->pfunc = insn->func; -- 2.29.2