From nobody Sun Feb 8 09:24:09 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E994C433F5 for ; Sun, 2 Oct 2022 10:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbiJBKqI (ORCPT ); Sun, 2 Oct 2022 06:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiJBKpM (ORCPT ); Sun, 2 Oct 2022 06:45:12 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8C251BE87 for ; Sun, 2 Oct 2022 03:44:45 -0700 (PDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2929nCsT000986; Sun, 2 Oct 2022 10:44:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=+bLZ7MT20C6kGPbgnaxm69KAWoMBzcbmRTj4CeVBf20=; b=Z4ezz2uZNh3EcUHOY5tywSte53S9lWS39p1Zoj5J+8VdwaUorWS/nFDQjOBcmIGToODS AbhlTV2w5t8Tcq3sYOfqbi9B5zneA0KkLiXEqVVy/Iui532WXF4iGACVA5TDmHI1p0la 7lO4LQ9SymBSIQD/vkfStYQQ+4HxScwEzq86DM3NHyrIYCYGAWBDJs6u12QXNITRyyw+ OhaCCCUqmGmc2948t0GrnaJpIVfo5Lz81SZjrVLYfbJd3HN++pA1GwUtEg6l0DCXlwGC 0iRY9hJrm8rYguWIQnNGyC3//qGubSbsZqeucZzO8mDg417UL5VNvDElcjf5LNF3rgEc Ow== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jxxuv9syb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 02 Oct 2022 10:44:30 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 292AhZYM002895; Sun, 2 Oct 2022 10:44:30 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jxxuv9sxm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 02 Oct 2022 10:44:29 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 292AbTkV026961; Sun, 2 Oct 2022 10:44:27 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma02fra.de.ibm.com with ESMTP id 3jxd68gymg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 02 Oct 2022 10:44:27 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 292AiO8V58589626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 2 Oct 2022 10:44:25 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E131A5204E; Sun, 2 Oct 2022 10:44:24 +0000 (GMT) Received: from li-c3569c4c-1ef8-11b2-a85c-ee139cda3133.ibm.com.com (unknown [9.43.71.20]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 79D735204F; Sun, 2 Oct 2022 10:44:21 +0000 (GMT) From: Sathvika Vasireddy To: linuxppc-dev@lists.ozlabs.org Cc: jpoimboe@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org, aik@ozlabs.ru, mpe@ellerman.id.au, mingo@redhat.com, christophe.leroy@csgroup.eu, rostedt@goodmis.org, mbenes@suse.cz, npiggin@gmail.com, chenzhongjin@huawei.com, naveen.n.rao@linux.vnet.ibm.com, sv@linux.ibm.com Subject: [PATCH v4 12/16] objtool: Read special sections with alts only when specific options are selected Date: Sun, 2 Oct 2022 16:12:36 +0530 Message-Id: <20221002104240.1316480-13-sv@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221002104240.1316480-1-sv@linux.ibm.com> References: <20221002104240.1316480-1-sv@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Np_Y_2tpcx61DHVngjz3yteuiCoDYo9l X-Proofpoint-GUID: 37CR4bdWlfyZCJxMM8j-MkTQIs-L3VLc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-01_15,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 clxscore=1015 malwarescore=0 impostorscore=0 suspectscore=0 spamscore=0 mlxlogscore=968 adultscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210020068 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Signed-off-by: Sathvika Vasireddy Reviewed-by: Christophe Leroy --- tools/objtool/check.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 35827e6c6df9..c6457dac6d58 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2372,9 +2372,11 @@ static int decode_sections(struct objtool_file *file) * Must be before add_jump_destinations(), which depends on 'func' * being set for alternatives, to enable proper sibling call detection. */ - ret =3D add_special_section_alts(file); - if (ret) - return ret; + if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) { + ret =3D add_special_section_alts(file); + if (ret) + return ret; + } =20 ret =3D add_jump_destinations(file); if (ret) --=20 2.31.1