Message ID | 20221028143346.183569-14-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 l7csp870841wru; Fri, 28 Oct 2022 07:44:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5OMOaNYpM1j339jvaAZmBTqJSC4X2HFgF/rocRB86QLt0EQzoRCnYKvlIL6q22RQzRnsEP X-Received: by 2002:a17:906:ef8b:b0:79d:8a30:5616 with SMTP id ze11-20020a170906ef8b00b0079d8a305616mr31772191ejb.522.1666968252794; Fri, 28 Oct 2022 07:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666968252; cv=none; d=google.com; s=arc-20160816; b=thmUYo4O2CDZ9X80B87nnACJxJdxirwO6ISo6d+oMCEKm7bfNqYDeC+ZLbvC6vjHIX LAsnM03t6Qxx7X7N4e/tFTmnMc/zUjmkwi+nvDkIb9el5HU623PrFZWDCWDDzgZtyWnK 9dIPafwIWw0ZlF5oF6L/pMyyr8ii+Zm8HYtugXof1fX/fyjEUhjthFcQrPCQiGDqQjtg Pafq6/RV5m00ujzOYddBkJh72G+7t/AWZXy5D2gXcbQuFFCQiEr5cnKn/4CjCKrLUFTB KIHuXcw1Lq4yUCp53OFzEsuyGkDvLUhKb/f7G3wGVOOVwqKgwDHejYQwpQt+AW5R8ClZ YLwA== 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=xz2HT3U3i+AwM29IiB9s/7S2JPakevApyv5uJ9vDXMM=; b=wRQBqtQmQW7pqkaROsMFhbAxpSWemTwXu5bFOblG4Cp7K/ueZvLr6Wr/tVYE2iHXDQ ttgReOmDRvNa3CJQ4ZFc2SZdG3JbbRQRf5fPK8gLYdbVBfbcC2lKBblZA0S+cKyXNZV9 lq5sAt5igNK9UjcG/sjeQVBC5Bc3wqkifQMZwsqZUYNp1pEwvggDRMRg9HUNczSVehgz pV3jBkebMhWR2NGl2dwqYRE4Fqdu9YSSug6z19cI+CfieK4R2CGADjwrfjqPjJORRkWx 9LfkFVcUac3ItUfATKYK6mDwBB05VjZ/UE09UrAYTWJv4AJYXnxD1IOP8+88JnIM0d0M JIuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rYVN2Vev; 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 l8-20020a17090612c800b00781bbff1cc1si4004434ejb.455.2022.10.28.07.43.48; Fri, 28 Oct 2022 07:44:12 -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=rYVN2Vev; 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 S230495AbiJ1Ogd (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 10:36:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiJ1OgD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 10:36:03 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 781B71C907F for <linux-kernel@vger.kernel.org>; Fri, 28 Oct 2022 07:35:41 -0700 (PDT) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29SEB7tq026466; Fri, 28 Oct 2022 14:35:20 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=xz2HT3U3i+AwM29IiB9s/7S2JPakevApyv5uJ9vDXMM=; b=rYVN2VevcDv7/IKwQJUmGsqlyaaxj8CtzEemertFyiWOyaEKBrbHlsk4K5OZgfii0Trl 2WYvD6LCQR2linVbVm8n9k0OZ46y3aQGanMNdBIJQ3W3MmYrq6+Hn9bhyO22tDcZcILB f1oYOZvcYE9ImbYkpbi1xjNZ7IjHxvvSm3ePgetn1BH+d7hiijOdze59G+tYc/gFUckI q8T37/6ijTc8FIUmtQ7sD6LeboMAz9wk69m5ObSNXx+TSvjrkwifMGWBZIXQAGT3Kvx0 sdA2F6JLKchl4slO6bzsFMoW1k5Qrn184jxZgND1VIjEUM/4Jc8YCaNioRKtIyetRUg0 eA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kggm70ypv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:20 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29SEBBHm026679; Fri, 28 Oct 2022 14:35:20 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kggm70ykk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:19 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29SEZ1Yl015942; Fri, 28 Oct 2022 14:35:17 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3kfahqkvjx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 14:35:17 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29SEZEHc7143954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Oct 2022 14:35:14 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C427BA4051; Fri, 28 Oct 2022 14:35:14 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0313FA4040; Fri, 28 Oct 2022 14:35:11 +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:10 +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 13/16] objtool: Use macros to define arch specific reloc types Date: Fri, 28 Oct 2022 20:03:43 +0530 Message-Id: <20221028143346.183569-14-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-ORIG-GUID: iodo2o35QQ9gWqcly6VxcpYe99lKr-Do X-Proofpoint-GUID: Op5oqI4xoJJvugDBqRwyRJLoHkMIcue8 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=887 impostorscore=0 phishscore=0 mlxscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 malwarescore=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?1747942902608369037?= X-GMAIL-MSGID: =?utf-8?q?1747942902608369037?= |
Series |
objtool: Enable and implement --mcount option on powerpc
|
|
Commit Message
Sathvika Vasireddy
Oct. 28, 2022, 2:33 p.m. UTC
Make relocation types architecture specific. 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: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com> --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/arch/x86/include/arch/elf.h b/tools/objtool/arch/x86/include/arch/elf.h index 69cc4264b28a..ac14987cf687 100644 --- a/tools/objtool/arch/x86/include/arch/elf.h +++ b/tools/objtool/arch/x86/include/arch/elf.h @@ -2,5 +2,7 @@ #define _OBJTOOL_ARCH_ELF #define R_NONE R_X86_64_NONE +#define R_ABS64 R_X86_64_64 +#define R_ABS32 R_X86_64_32 #endif /* _OBJTOOL_ARCH_ELF */ diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 752a6ffd5c4c..2d7153b5d5d1 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -885,7 +885,7 @@ static int create_mcount_loc_sections(struct objtool_file *file) memset(loc, 0, addrsize); if (elf_add_reloc_to_insn(file->elf, sec, idx, - R_X86_64_64, + addrsize == sizeof(u64) ? R_ABS64 : R_ABS32, insn->sec, insn->offset)) return -1;