Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2755342ybh; Mon, 5 Aug 2019 06:20:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkw1CTvfmVqeqT2wFwWF7wfTsX3QMRrNYDb5q/HVv05hZ/9xmUo+FI23pQ5dziplkl2XA2 X-Received: by 2002:aa7:9513:: with SMTP id b19mr73295688pfp.30.1565011229907; Mon, 05 Aug 2019 06:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011229; cv=none; d=google.com; s=arc-20160816; b=Tx1RTz0pMR8zPsq/DHpuZBC6Eu1f0X/bUB+CjaQi/PKpBJyNdKX4uifRvcbM7izjby VuMQStEC+kNVlRQaiQmL9ZASy+lbJ+sPzJfdoRPpfFlaEMDZR27mFT/PIDzN6VMGfPMI tBVbTusiNdQ0mrhDkUHdo3Ptiw/ssdjriC/3o8net91LcbA/FhWLoQi3EX/e2cOQtdeA Xq2DHE8PL5GqMtYGRYaucdJiCwVUntC1mg8bTcnvq6fo0wg82RO5Dy2msEt+nH6nyM1c tdVw9kSOgfFSHUSX4vtfeiCBffXxrsYuPnmOTtsdXfLA7h0ZY9SXA3+ERHPznCYNt0TX 3UFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p7j1HkHuC2yLpMHxuhiPo84dhMRd8DmjeRjmQob5HD4=; b=Q5+m457cNbHTXyGpOP5AaikDW38N9A518p/hE43+xVV939hnjsgZlL45DWzwNy71tC nS6Y/0GTuS5m1Hm5avQZ5nBWPkFF4NB7X+zgwCZZa0zoMj7pgyoLaTzXjVkiCMOB+ah5 KQY5Kv7kDwxdFpAoI/7BQ7RhKEgI4shiBeczodw23UKWjc4SKSZAME4UrThF6O4BQz3i pP1TXILEXZdZGaKnKAeSefP/7sWiimyBb7DpQ4v1g8tslMk2QjeIVqzCWIIHLrJtEgaQ JJwru2iEvA5dfL0xTh+NyqrtenzgVkerz+ttMSFHrCRpQgi7uBqkaikyV39uzNXN7e0N enGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iUlxfz1w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z193si43341660pgd.235.2019.08.05.06.20.14; Mon, 05 Aug 2019 06:20:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iUlxfz1w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728844AbfHENTi (ORCPT + 99 others); Mon, 5 Aug 2019 09:19:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729672AbfHENTe (ORCPT ); Mon, 5 Aug 2019 09:19:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EFE9214C6; Mon, 5 Aug 2019 13:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011173; bh=qFsiztdLDvQWTMxiXFUptRNbM9KiUDEKG8b6B96WFkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iUlxfz1wYKbh5GhTrmMoElkW26DbgRDsBXPugUxRdTvWjebHKDDdZR2E5VFcT5cmP 40LSpFUky62juNKB0mtK2VnJM5c4tTeVZdmUu80Cj1it+T+33EKm0flCua+T/gyn3e H7etDVkYC9PGYHyow6RoiLN1WJyj2wB6W2XzLQt0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Josh Poimboeuf , Thomas Gleixner Subject: [PATCH 4.19 71/74] objtool: Support GCC 9 cold subfunction naming scheme Date: Mon, 5 Aug 2019 15:03:24 +0200 Message-Id: <20190805124941.535629949@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124935.819068648@linuxfoundation.org> References: <20190805124935.819068648@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Josh Poimboeuf commit bcb6fb5da77c2a228adf07cc9cb1a0c2aa2001c6 upstream. Starting with GCC 8, a lot of unlikely code was moved out of line to "cold" subfunctions in .text.unlikely. For example, the unlikely bits of: irq_do_set_affinity() are moved out to the following subfunction: irq_do_set_affinity.cold.49() Starting with GCC 9, the numbered suffix has been removed. So in the above example, the cold subfunction is instead: irq_do_set_affinity.cold() Tweak the objtool subfunction detection logic so that it detects both GCC 8 and GCC 9 naming schemes. Reported-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/015e9544b1f188d36a7f02fa31e9e95629aa5f50.1541040800.git.jpoimboe@redhat.com Signed-off-by: Greg Kroah-Hartman --- tools/objtool/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -305,7 +305,7 @@ static int read_symbols(struct elf *elf) if (sym->type != STT_FUNC) continue; sym->pfunc = sym->cfunc = sym; - coldstr = strstr(sym->name, ".cold."); + coldstr = strstr(sym->name, ".cold"); if (!coldstr) continue;