[v5,12/16] objtool: Read special sections with alts only when specific options are selected
Message ID | 20221028143346.183569-13-sv@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp870666wru; Fri, 28 Oct 2022 07:43:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ve/8BlpM4o0Wubx7didvd8UGE8U3tbnJ+B9XoR4MDPjltFL1UCquQU/i2m5nH5JWoyBlR X-Received: by 2002:aa7:d357:0:b0:45b:dab5:9789 with SMTP id m23-20020aa7d357000000b0045bdab59789mr52490324edr.222.1666968238579; Fri, 28 Oct 2022 07:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666968238; cv=none; d=google.com; s=arc-20160816; b=MeihpbIAGj9/afXGsLPDsxzJ3oX2VqRLKadkOIiWUdu/PsvfaBbNyroLKsYjqp/n6/ n0DduJcTPz+ybqvUuY96wqNEK+igQlwmvzcw9OlVZSMRNpeZdmL7ZyQE6RhjBYIJKuIw 8o3RzUqXdjzjoOyMByY2Dw3rz2KXIRra7nGuSgE/JE4Nna3WGIyL6yGKKo61bX7DHGfS TI+Y5qsPxDfZ3lhmXU7oQBNHRv7SLpWIINnynYWbWqvySW0T9hAT6lt08FU1gAv0hYMH CkuUxJCxbPufp6Ln3ONbcbRrggbtb80LHQlS5NAipleUv6ZMG6ZRIlCieGeYB6PrEA9H PF0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4k/rdNumXQft386BS6nTbPJDsgjlCfRAZJSeNCUeFYk=; b=F4z6sAJpfa+0S1GO8hWKr+mko0cqcz5Rl8n0faQYYn9hrNKDxQZmp8VXSkK68u/r12 1qHtRudvNLVjBzw8KOb/30vyoOi/SCiBUczkDBf2zppA0gPTfqGhf7G27BHk5aAWm0Xt VRJITyC0eMVm9beUecXWT7lh8qhBMqtSapp/wDwW1d912mJASYF12YX1vv2tnuQlPpfe 7nwOB1wNOzIQJLrXwuRzN3dXD/LmO6iV4qKtmK9Aispdi6VobqWxsY/Sg3d72kh0kDwl xl0c0c74j6smECYE6eYWcVfjU1Xb1lKW6BZqWb+EoIa9gGywNbeS8PZi/5gxJas4nTxI dDtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=cOIWBVXM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho36-20020a1709070ea400b007882926c090si5764696ejc.773.2022.10.28.07.43.34; Fri, 28 Oct 2022 07:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=cOIWBVXM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231174AbiJ1OgU (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 10:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbiJ1Ofw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 10:35:52 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92DE21CC3F1 for <linux-kernel@vger.kernel.org>; Fri, 28 Oct 2022 07:35:36 -0700 (PDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29SEBuFj005159; Fri, 28 Oct 2022 14:35:15 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=4k/rdNumXQft386BS6nTbPJDsgjlCfRAZJSeNCUeFYk=; b=cOIWBVXM5l4IWp2QY/vTUPEVx8MSLHAjjNPHB1xPdxY6BMVaXvNRqxgvvcMcbKHeXMvB LHVT4i+tdytslTJe4rLCvnUPywd55S3iFxYQIzDDn/Oliw+ovAGC+ibZ+IxkU/viEFAy XBmsIw268kyRBH3OFwQZnjq3puCJqnRysj9w2VsID1tkrxfhBaGcQMBozKqS3Ty6Q2rP sC1mP7aGKpB6F6C8Yf+FfBw6c0s5EbN2ssdLzWsA5cr30ovsqxmqA54kqyDXC0y0jBqA kB1VTOmviiz+xrzB63a9mfPaeTxAaV6+mSooFXyc+Ac/ytZmQAdGUX9GmLVdDMY8u3BG Pg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kgfhnu7v6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:15 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29SEYrJK004950; Fri, 28 Oct 2022 14:35:14 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3kgfhnu7rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:14 +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 29SEKbPZ019341; Fri, 28 Oct 2022 14:35:12 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma02fra.de.ibm.com with ESMTP id 3kfahmjqfs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:12 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29SEZ9SA852594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Oct 2022 14:35:10 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D8D1AA4055; Fri, 28 Oct 2022 14:35:09 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F29CAA4053; Fri, 28 Oct 2022 14:35:05 +0000 (GMT) Received: from li-c3569c4c-1ef8-11b2-a85c-ee139cda3133.ibm.com.com (unknown [9.43.124.163]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 28 Oct 2022 14:35:05 +0000 (GMT) From: Sathvika Vasireddy <sv@linux.ibm.com> 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 v5 12/16] objtool: Read special sections with alts only when specific options are selected Date: Fri, 28 Oct 2022 20:03:42 +0530 Message-Id: <20221028143346.183569-13-sv@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221028143346.183569-1-sv@linux.ibm.com> References: <20221028143346.183569-1-sv@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cjaixYULH6UjhZRemu42A2TqsbJiwClw X-Proofpoint-ORIG-GUID: ly0I6L1kcJiuXbo9jSlqojcB5QBkRUzn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_07,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 impostorscore=0 bulkscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280090 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747942887471919100?= X-GMAIL-MSGID: =?utf-8?q?1747942887471919100?= |
Series |
objtool: Enable and implement --mcount option on powerpc
|
|
Commit Message
Sathvika Vasireddy
Oct. 28, 2022, 2:33 p.m. UTC
Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com> --- 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 71cf4b4ba1da..752a6ffd5c4c 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2392,9 +2392,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 = add_special_section_alts(file); - if (ret) - return ret; + if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) { + ret = add_special_section_alts(file); + if (ret) + return ret; + } ret = add_jump_destinations(file); if (ret)