From patchwork Wed Nov 16 23:21:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 21322 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp111487wrr; Wed, 16 Nov 2022 15:21:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf54ZkX4apHp1TzSJXz0NrETpfu+y7oa8yYQ7YWK1ybmsp9yjAmKqd2o4CsR0dDm0sq8lNFU X-Received: by 2002:a05:6402:518:b0:467:8813:cab5 with SMTP id m24-20020a056402051800b004678813cab5mr17876258edv.369.1668640916368; Wed, 16 Nov 2022 15:21:56 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u14-20020a170906950e00b0073beb58e98dsi13161614ejx.276.2022.11.16.15.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 15:21:56 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=lWknXinj; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4768B396DC30 for ; Wed, 16 Nov 2022 23:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4768B396DC30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668640915; bh=loxTKKheC0xBmSjQeUqnqyQ8ELolVvdi+qibRtmkKB0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=lWknXinj12QPkyso9cVUInxC7D+FrkW2oAa5tJPRDBiT3lXh33UWN9U91rTqSsAeX 9YH+mnXMgUXIhitonhX+nDzAQmQocdHpWsDvByAxRJQvHKc5mI+oSQpN8kLvNe1bGt RZGndUqqIp1VQm/17XLqw41Gd1qiguLDaozcw3fs= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 6603B396E427 for ; Wed, 16 Nov 2022 23:21:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6603B396E427 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGMi59x006514; Wed, 16 Nov 2022 23:21:41 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kv3hty1d5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 23:21:41 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2AGM1RGu040915; Wed, 16 Nov 2022 23:21:41 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ku3k92g9e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 23:21:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jw6PIjpTV/+r+Ql0ytT2/qqFtrgCufmhmncZgBOhxBGj0v/phKdsp4n3nW5F9DgiAxUK3AeQ1Yc84iS1gG/IK2Az+9EBWxAE8DgqJPOY1Ncu0vd/W64jw2TzYIGpnr6deWntLyz/KMHNP/MHjSQD6IArb+1LTjx2UdBSvndtyE5bdXXhLdQVvZKbs7YucWYcrqDY/oCauaIZV1ocMFCzkE9mlYdeSNZUkgjCjJZm+Ec594tUXCw7RJQBH1xdeObhDddXJDMYt9cWbvr6CLPSrD660D0IouPTX/91jMEXb+4jOedkLvIPqz/rUvfhdeKhZwFog5IqAObCOz1c7Um2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=loxTKKheC0xBmSjQeUqnqyQ8ELolVvdi+qibRtmkKB0=; b=kBGggBWM91Hlt22CUf1OfnpBzGXdokuHNGgztFPGftZzZrmvw/3ZL1xb684EPsnW03Ldpa8EMHliiQnzUsKHodAIytWZdblJpeV2dfDbRfc2tP/ZNOz6OQxw26LawC+WvA4B9CPK/b8IAjTJf6ZNxt4ZtH9tkyGTD/ck9/eSuYYGsOp1wRrO3wgBOJSYvztBkZkY0yRhmDNdFkLOqd7ru+FeRdHvFZ7ArDfpp3qdoRo85yDnPIeaICVuIZLWD/FGjH+CMvqSNsVKhTcysY7zIDaV00ampFUW/DIhGbmtXZmG6DCFeAGV8fO0vYW50WmAhzenmpuTmwiObwXpcrACbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by CY8PR10MB6780.namprd10.prod.outlook.com (2603:10b6:930:9b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Wed, 16 Nov 2022 23:21:39 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc%5]) with mapi id 15.20.5813.013; Wed, 16 Nov 2022 23:21:39 +0000 To: binutils@sourceware.org Cc: zac.walker@linaro.org, Indu Bhagat Subject: [PATCH] [gas, aarch64]: fix build breakage for aarch64-pe Date: Wed, 16 Nov 2022 15:21:32 -0800 Message-Id: <20221116232132.1009459-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 X-ClientProxiedBy: MW4PR03CA0046.namprd03.prod.outlook.com (2603:10b6:303:8e::21) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|CY8PR10MB6780:EE_ X-MS-Office365-Filtering-Correlation-Id: e90bcf33-b7a8-48f8-0841-08dac8295027 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aajciBSONE1wrH4FRWYAE3ygYHRF1YwfhPIn3JSAjjm6djooeO+KBuY5lc+AhC9yD2Y2j1c3M8qO9mteJHmaVTqHvL0vIgdbfO70Lx2v77NEN5In2VJAQSYEyNaZsB7tTk7zM53TKkt273ChTbq3jiPGQHMA+Kq7BlS0/0QIiRnAUqGDibMi4vFRTN1jEQNRAKMQPIXASXwW1RYF7ZNMPxkjtm7FSy+6wytLwMAsr+e/leQ4wrQQVarlYNdiyvxHvXqAX6hcFSvFAu77O8R5yaVpARCth2hcoCYrbDG9OHoOc/3OyJhP2N5Kp8yoSPqbofKGNuuJAQioUAHtyjzGKyUE4VnCh4+ixdicDXLkyMzcltqBRMGQ/ZZtM4+ZjX8pvV49+MHsCqF63zUsru/cEBQdgG/YjH8xlftW6S3xibPhEXtskQjziwznZXnQF9NUF2coMjyttr2AktqsXfAC21wnAeQV5+9gm2eTzI1iaYMqbAZS1DWJhhBxxabrK8FKmys/vcF4fTjMEeEKTk9lvrQCztca4TdaEkposQ10UynjTL7TcAFvUKXhTAqVBqOc8rsocpbTI4iiD84B9QbcsHIBzRfaRlWL3oF+qAuTc/AfIso1KtNxv4Frm0QjUDldwKhLrrSzClEBxAXpDYTWh/kI9UeG2T9yHi21LClqpb64zmzNZ9Oe3/PABfLl3YpoX6L+heGfJDkyoyQDc75Hxw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(136003)(366004)(396003)(346002)(39860400002)(451199015)(478600001)(316002)(6486002)(4326008)(6506007)(6512007)(66556008)(66476007)(66946007)(6666004)(8676002)(2906002)(1076003)(41300700001)(6916009)(44832011)(38100700002)(186003)(8936002)(5660300002)(2616005)(36756003)(83380400001)(107886003)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MFvq0DMy1qbDzqzicCkNSP1t90HFcl/sX2VBcne+nhdlUW70tDIB7tUb5hwrH9aF12y4u1B2ZREVZxBYXWQVBaG26+F854nOVcy9ZdCxRif7EwATrRJg6Pv+1Cb82WnHBc+m9gi5twM03H05gWiy+5B6o7Z4Yb9IUuY8k66ibSMRQProy31P0LiI9KxjhFw2hwds/IFX2WQqyIQcg6tFxBp+tLautTANpRHrF3ckFjcfAM6lptqmXrHYTFi5g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PIy4sjsd6aoBjk1oWiXCHV6Mpo/H47IgwCVmzKmWNGNoVE/EsqUZU9XlkditxDnXt5Z0tBcHzPVEeClKIET+7XjcB0WDjVb3CtxlPGF3aOFnX7Tqv4RgfNYzmD0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e90bcf33-b7a8-48f8-0841-08dac8295027 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 23:21:39.2483 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4NUdZG6AQfQ6NqYSJUwZZeN6Y05Xhe4AcBf/Wzb3YIaY6odUpIGjRJ4lV2bk6hcMe3Yk/QpofloeY9oRxbbH1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR10MB6780 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160159 X-Proofpoint-GUID: lUKG2Ih8Yy3bDFPwKxL6a6F68jrvQI3- X-Proofpoint-ORIG-GUID: lUKG2Ih8Yy3bDFPwKxL6a6F68jrvQI3- X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Indu Bhagat via Binutils From: Indu Bhagat Reply-To: Indu Bhagat Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749696817519808230?= X-GMAIL-MSGID: =?utf-8?q?1749696817519808230?= Hi, This patch should fix the build breakage on aarch64-pe caused by the SFrame patch series. The issue was that the definitions related to SFrame APIs were not guarded by OBJ_ELF, they were errneously guarded by a more relaxed condition of OBJ_ELF || OBJ_COFF, hence causing build failures. Testing notes: - Tested build and make -k check for selected folders for --target=aarch64-pe. Thanks Indu --------------------- SFrame is supported for ELF only. Keep the definitions and declarations guarded with OBJ_ELF consistently. ChangeLog: * gas/config/tc-aarch64.h: Guard SFrame related definitions with OBJ_ELF. --- gas/config/tc-aarch64.h | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h index 91412ce8292..00efc26263c 100644 --- a/gas/config/tc-aarch64.h +++ b/gas/config/tc-aarch64.h @@ -239,6 +239,28 @@ struct aarch64_segment_info_type /* We want .cfi_* pseudo-ops for generating unwind info. */ #define TARGET_USE_CFIPOP 1 +/* CFI hooks. */ +#define tc_regname_to_dw2regnum tc_aarch64_regname_to_dw2regnum +#define tc_cfi_frame_initial_instructions tc_aarch64_frame_initial_instructions + +extern void aarch64_after_parse_args (void); +#define md_after_parse_args() aarch64_after_parse_args () + +#else /* Neither OBJ_ELF nor OBJ_COFF. */ +#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_" +#endif + +#if defined OBJ_ELF || defined OBJ_COFF + +# define EXTERN_FORCE_RELOC 1 +# define tc_fix_adjustable(FIX) 1 +/* Values passed to md_apply_fix don't include the symbol value. */ +# define MD_APPLY_SYM_VALUE(FIX) 0 + +#endif + +#ifdef OBJ_ELF + /* Whether SFrame unwind info is supported. */ extern bool aarch64_support_sframe_p (void); #define support_sframe_p aarch64_support_sframe_p @@ -268,25 +290,7 @@ extern offsetT aarch64_sframe_cfa_ra_offset (void); unsigned char aarch64_sframe_get_abi_arch (void); #define sframe_get_abi_arch aarch64_sframe_get_abi_arch -/* CFI hooks. */ -#define tc_regname_to_dw2regnum tc_aarch64_regname_to_dw2regnum -#define tc_cfi_frame_initial_instructions tc_aarch64_frame_initial_instructions - -extern void aarch64_after_parse_args (void); -#define md_after_parse_args() aarch64_after_parse_args () - -#else /* Not OBJ_ELF. */ -#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_" -#endif - -#if defined OBJ_ELF || defined OBJ_COFF - -# define EXTERN_FORCE_RELOC 1 -# define tc_fix_adjustable(FIX) 1 -/* Values passed to md_apply_fix don't include the symbol value. */ -# define MD_APPLY_SYM_VALUE(FIX) 0 - -#endif +#endif /* OBJ_ELF */ #define MD_PCREL_FROM_SECTION(F,S) md_pcrel_from_section(F,S)