From patchwork Wed Oct 23 10:35:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 99387 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1687C3858C50 for ; Wed, 23 Oct 2024 10:37:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:2608::601]) by sourceware.org (Postfix) with ESMTPS id EB4993858C98 for ; Wed, 23 Oct 2024 10:36:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB4993858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EB4993858C98 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2608::601 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729679809; cv=pass; b=gyFLYwW0JrqVzO0p7rlKv+xDdNUV1IbtUi2TolpnU/2f90lOWhy7AmupYI8F6kQYXUB/V+u1CI8AuWWNynIZ7la6gXzUuEK1L7AdCaOp4rRATxeH/lfU5heKRs0EeKln0x+VSW/BItIAfdW3RDe829zq9sTVPO6nILkbqCJdMV0= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1729679809; c=relaxed/simple; bh=lL2/xYCguCmJg5HFDTqCf3BH02I4z4OQLR83H9GsCJ0=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=UPwMG5KjRhZvWJsYww8b5NZCFCa6gzfaMjRunkAQA3YiB2yuhxa9WG+znZdZRI+ht/PHJnnG9uLmljsPhvJ2V6gLUF8+BSRjYa355BoCuJE5ogsmiCCopYPw08O1nD1OQOB74v7HPkkFqFIgtm2u1Sl6CMExViCuqM1PdQH63F8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=eImWHCQp3CfrTraH0yqQdTLvlRdF3/NkgGl1eLgTH22BfM4+bS0TRjxgxhkHP/BxXZ4EFxrEprjEdq1MqInb/Re1MeKOP9E6HIqMgAbk3vlJ/s78ThZsC5ebiytJgn9/O3Zzsv0Cl1xcvPWjSUtWV0y2Oi5QQGiB9ivosPfsFVTHlnoEHwG4gzUG4jFwg2OZQV2TelfM+K0zByMB673dWAWyPb7FSdXpd/aYiO8uc/cLl284x8wwjK9IvkTt1RsQXxJblhveaTmJvrdDWhoA92n0QgAQNDPAm/vOuV75YmYA/tncN8Bg86RTaRDqTdpu5tT3V7/s6HxDf2GXCgE5TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=m1Sg2KQBxgS5o4C/a92LOzHCVHh2lXVALLjca8GABIU=; b=rUtGjGXQNmFLkFTb/obp6twGpC5igDXwAwvbrECYQeDbrrp8sSOpO+mgfEwxMOclLVbXEhtCvVbDst90KGdNIyrddGbuEosAueljWQDI7ylJ/aGJBgJSQwIJJz7IasDILFKDEmku+QaAmGObCwfzVSwnoG5QsN4XODHxWOIgKsVbq7oaNVvisCGJNfMvjsCQp0+1yyL/PqX7TxIRVpnkNp8XzAiRVuqyHlo7OhTFGcpE33sb2xTyCdi20dfqGb+uN7+9z6u/4brGplCz6KPINBATC9fHJJI60sooRTAsfATWjhyYQemqm8z3fVbJ5VeEJc/0DNAAtIStLzOdDeVTOw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m1Sg2KQBxgS5o4C/a92LOzHCVHh2lXVALLjca8GABIU=; b=eH+g3aF34MUOo93/3BS3rLTVJ4dAyYXBUucE33rICsqgzoQELYTiyQQhBKRK35l9eQA6/ZB5ZUhcId43bC9EmNvrgNJkA3wcYbkNWuCS495py43hGT49yXC4PRvuwuZCVf+y8Uv+yZvnPqGq9jxhvL0TVAufv++ZqIJrEKQArVc= Received: from DB9PR06CA0006.eurprd06.prod.outlook.com (2603:10a6:10:1db::11) by PAWPR08MB8813.eurprd08.prod.outlook.com (2603:10a6:102:335::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Wed, 23 Oct 2024 10:36:39 +0000 Received: from DB1PEPF000509F5.eurprd02.prod.outlook.com (2603:10a6:10:1db:cafe::2) by DB9PR06CA0006.outlook.office365.com (2603:10a6:10:1db::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Wed, 23 Oct 2024 10:36:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB1PEPF000509F5.mail.protection.outlook.com (10.167.242.151) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 10:36:38 +0000 Received: ("Tessian outbound da7ba6582322:v473"); Wed, 23 Oct 2024 10:36:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 665ce39727b0a011 X-TessianGatewayMetadata: MgbeSxpBer+B5ZtSQGSydOH3PvBLD3Tof3Lw6jZytiJUGPu2y1JhGKftX2u0Lz3XVVWVhS4TWtTZazvG7kmdRv++kTicNd2HVVtHnSMZOxBsLgTq7D3hOPZ1MqHpvQybF8N6sTWLc78LDE6s0wkheNRUUhUZkM6dnBPIREKSf6o= X-CR-MTA-TID: 64aa7808 Received: from L8e7a290765dc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E755EF14-EF0C-469E-9122-F8958628FEA1.1; Wed, 23 Oct 2024 10:36:30 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L8e7a290765dc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 23 Oct 2024 10:36:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ng5dS2FTGhh/fDEgS4LIjpk+DpAFcN4aYia3b63RtIu+O08+TrCTpwDfBXMMJYuZvljAb+HrclutJI3gogfRaWcMNdSXv1xpVQtGgjX2ZP2tewasGbZ4ahsW9y5lWlHyXC9oo+WqiPKEZyQjsO0rCvMqFniEdDdKgxO+fsNquYV6620snA9qJD586XCNAotH3ndosumy21ebSHeIZ2XCDryKqrCl0Tc8rirbb1GJpF1n+6IdwAMRq6RyLHoh12oE1RaVoaC7VGrtNC/h5e6kLLMnrXy7quSxDraH3VfFzoOg+g3gtUQa/EMuvQhPgq9uf//aNFuUrB1p8+IKVgbjaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=m1Sg2KQBxgS5o4C/a92LOzHCVHh2lXVALLjca8GABIU=; b=KYxAn54Y4GTE6glOprF74MIH1XC32JnnM+2IXgCg+JceAqw7G1fycODm2Fl8iOM5ctPiRQqhv5C4tRGCAIIn5zfbDNetDZkNDVXe4fiUFOfb5cYbQWu4ODXUpsK4x6eHcuLq8o5m/LPwNXtMlM6PwLrDgCl4dCGiXHP8E9cC9bVtvCiNGDl2O/WwqaDnKTAHMVjEujLJQk37OId6SRabGHbKYyJZGLT9mdHaNS2RALN3HrhcenQoyRYnR99gywLKYv4om80sjA3SYZaw/DuNpXefKnOF6jtckvIl6kaODEPD65SxCBq8XEq1LQlWQHDqS95PEpG8tZ5I5J9U7hXgQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m1Sg2KQBxgS5o4C/a92LOzHCVHh2lXVALLjca8GABIU=; b=eH+g3aF34MUOo93/3BS3rLTVJ4dAyYXBUucE33rICsqgzoQELYTiyQQhBKRK35l9eQA6/ZB5ZUhcId43bC9EmNvrgNJkA3wcYbkNWuCS495py43hGT49yXC4PRvuwuZCVf+y8Uv+yZvnPqGq9jxhvL0TVAufv++ZqIJrEKQArVc= Received: from DB3PR06CA0021.eurprd06.prod.outlook.com (2603:10a6:8:1::34) by VI0PR08MB11041.eurprd08.prod.outlook.com (2603:10a6:800:256::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Wed, 23 Oct 2024 10:36:25 +0000 Received: from DU2PEPF0001E9BF.eurprd03.prod.outlook.com (2603:10a6:8:1:cafe::f1) by DB3PR06CA0021.outlook.office365.com (2603:10a6:8:1::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Wed, 23 Oct 2024 10:36:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DU2PEPF0001E9BF.mail.protection.outlook.com (10.167.8.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 10:36:24 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 23 Oct 2024 10:36:23 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 23 Oct 2024 10:36:22 +0000 Received: from PW070M4K.arm.com (10.57.85.41) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 23 Oct 2024 10:36:22 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , Srinath Parvathaneni , Kyrylo Tkachov , "Eric Gallager" , Matthieu Longo Subject: [PATCH v2 2/4] aarch64: add minimal support of AEABI build attributes for GCS. Date: Wed, 23 Oct 2024 11:35:58 +0100 Message-ID: <20241023103600.500910-3-matthieu.longo@arm.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241023103600.500910-1-matthieu.longo@arm.com> References: <20241023103600.500910-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9BF:EE_|VI0PR08MB11041:EE_|DB1PEPF000509F5:EE_|PAWPR08MB8813:EE_ X-MS-Office365-Filtering-Correlation-Id: 32e9c96c-ae85-45ec-36c3-08dcf34e9343 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?q?+gHEELBajRakvQhRjFHwGS?= =?utf-8?q?xOElQxRpX3jG1sccpZs5+GdX4MlGBVm6nbkS6Xccc9is0hle7zAL1x4mBnewxENMz?= =?utf-8?q?RUg0qfqVQlQa7JEV09UCwOx1WYsOf3mToFoGKSsO2TynYtTRYaj+5DMCSl1tKF6SX?= =?utf-8?q?Wws3f21jI53GrHphxHdlOEUphJ1jNSjEFFupsf1bhBaw6AeyVKG3KAxmF/OcMy/of?= =?utf-8?q?G4DJprdM1Ki/pOWCSKYe3R5PfZ13BsWIQP2wxP4eUk0EYoTad4Nso6rqY55mp8rwK?= =?utf-8?q?Hml/6PG676GKuAVPw/JsxwI5Lw5p+sWBIsbX/42Xq37MUXz5SOL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4uSnDL?= =?utf-8?q?0xFWMwi1DTfMYjOswFeqt1cqrxvmiKXxAIiajQnwy2VDPvHiBWHUfQ3DAbXF0pPvK?= =?utf-8?q?9wW+8Cnwj/utvOtKSwUQMNNbJq71OwCK2DNMSFZcFSto26/BN5dY85zpcDoY7fL28?= =?utf-8?q?=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB11041 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:8:1::34]; domain=DB3PR06CA0021.eurprd06.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509F5.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 16bf8e34-b799-4a08-7a99-08dcf34e8b46 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?G8/MN8xY3dUjQBavoNFGEwHSLc9jUqH?= =?utf-8?q?5x+aGIsm1W9ZeyiPJN6dFGwkLb2czaQEvXkr3kOLq6EdTPVlUAopb4YvUPvGDuvf2?= =?utf-8?q?woEGvfTZ/xslmGvKNu5SPuy9KxlLXNtK61PzJTusDMQ///THh/c3TKdrE51042Msh?= =?utf-8?q?+vKvbEKOTWNdLBTCn5zFrLMLUlnt+JHEGsibtF5tYuS/TzVHrOCZU6W4ChUJzabh3?= =?utf-8?q?sS4NDLRZj08sS/dkO3DJkun9jBVrp6aKtXcfTpdFe1CmGw520dIVuFfbA3ZnAEMOj?= =?utf-8?q?D0+gYevCSAq7486aIKMXyzRzkz9+ksKkFYgNrl7tlbac1jwhBqDpjbTutfdhOmVT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?q?p5kkyxOmX5wsOruMqXudQOpVA/aiG736Uw6rCFQFBc/1Gk+la0l4218raack55QJZ?= =?utf-8?q?Kc1x6B8EEENs5nkl2UaxZ1Tx71AWMO/us+mRIQ9OO+PJjdnp2XYvGXFM=3D?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 10:36:38.3422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 32e9c96c-ae85-45ec-36c3-08dcf34e9343 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509F5.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB8813 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org From: Srinath Parvathaneni GCS (Guarded Control Stack, an Armv9.4-a extension) requires some caution at runtime. The runtime linker needs to reason about the compatibility of a set of relocable object files that might not have been compiled with the same compiler. Up until now, GNU properties are stored in a ELF section (.note.gnu.property) and have been used for the previously mentioned runtime checks performed by the linker. However, GNU properties are limited in their expressibility, and a long-term commmitment was taken in the ABI for the Arm architecture [1] to provide build attributes. This patch adds a first support for AArch64 GCS build attributes. This support includes generating two new assembler directives: .aeabi_subsection and .aeabi_attribute. These directives are generated as per the syntax mentioned in spec "Build Attributes for the ArmĀ® 64-bit Architecture (AArch64)" available at [1]. gcc/configure.ac now includes a new check to test whether the assembler being used to build the toolchain supports these new directives. Two behaviors can be observed when -mbranch-protection=[gcs|standard] is passed: - If the assembler support them, the assembly directives are emitted along the .note.gnu.property section for backward compatibility. - If the assembler does not support them, only .note.gnu.property section will contain the relevant information. This patch needs to be applied on top of GCC's GCS patch series [2]. Bootstrapped on aarch64-none-linux-gnu, and no regression found. [1]: https://github.com/ARM-software/abi-aa/pull/230 [2]: https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/vendors/ARM/heads/gcs gcc/ChangeLog: * config.in: Regenerated * config/aarch64/aarch64.cc (HAVE_AS_AEABI_BUILD_ATTRIBUTES): New definition. (aarch64_emit_aeabi_attribute): New function declaration. (aarch64_emit_aeabi_subsection): Likewise. (aarch64_start_file): Emit GCS build attributes. (aarch64_file_end_indicate_exec_stack): Update GCS bit in note.gnu.property section. * configure: Regenerated. * configure.ac: Add a configure check for gcc. gcc/testsuite/ChangeLog: * lib/target-supports.exp: (check_effective_target_aarch64_gas_has_build_attributes): New. * gcc.target/aarch64/build-attributes/build-attribute-gcs.c: New test. * gcc.target/aarch64/build-attributes/build-attribute-standard.c: New test. * gcc.target/aarch64/build-attributes/aarch64-build-attributes.exp: New DejaGNU file. * gcc.target/aarch64/build-attributes/no-build-attribute-bti.c: New test. * gcc.target/aarch64/build-attributes/no-build-attribute-gcs.c: New test. * gcc.target/aarch64/build-attributes/no-build-attribute-pac.c: New test. * gcc.target/aarch64/build-attributes/no-build-attribute-standard.c: New test. Co-Authored-By: Matthieu Longo --- gcc/config.in | 6 +++ gcc/config/aarch64/aarch64.cc | 41 +++++++++++++++++++ gcc/configure | 38 +++++++++++++++++ gcc/configure.ac | 10 +++++ .../aarch64-build-attributes.exp | 35 ++++++++++++++++ .../build-attributes/build-attribute-gcs.c | 12 ++++++ .../build-attribute-standard.c | 12 ++++++ .../build-attributes/no-build-attribute-bti.c | 12 ++++++ .../build-attributes/no-build-attribute-gcs.c | 12 ++++++ .../build-attributes/no-build-attribute-pac.c | 12 ++++++ .../no-build-attribute-standard.c | 12 ++++++ gcc/testsuite/lib/target-supports.exp | 16 ++++++++ 12 files changed, 218 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/aarch64-build-attributes.exp create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-bti.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-gcs.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-pac.c create mode 100644 gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-standard.c diff --git a/gcc/config.in b/gcc/config.in index 7fcabbe5061..0d54141ce30 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -355,6 +355,12 @@ #endif +/* Define if your assembler supports AEABI build attributes. */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_AEABI_BUILD_ATTRIBUTES +#endif + + /* Define if your assembler supports architecture modifiers. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_ARCHITECTURE_MODIFIERS diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 0466d6d11eb..90aba0fff88 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -109,6 +109,10 @@ and 1 MOVI/DUP (same size as a call). */ #define MAX_SET_SIZE(speed) (speed ? 256 : 96) +#ifndef HAVE_AS_AEABI_BUILD_ATTRIBUTES +#define HAVE_AS_AEABI_BUILD_ATTRIBUTES 0 +#endif + /* Flags that describe how a function shares certain architectural state with its callers. @@ -24783,6 +24787,33 @@ aarch64_post_cfi_startproc (FILE *f, tree ignored ATTRIBUTE_UNUSED) asm_fprintf (f, "\t.cfi_b_key_frame\n"); } +/* This function is used to emit an AEABI attribute with tag and its associated + value. We emit the numerical value of the tag and the textual tags as + comment so that anyone reading the assembler output will know which tag is + being set. + example: .aeabi_attribute 3, 1 // Tag_Feature_GCS */ + +void +aarch64_emit_aeabi_attribute (const char *name, uint8_t num, uint8_t val) +{ + asm_fprintf (asm_out_file, "\t.aeabi_attribute %u, %u", num, val); + if (flag_debug_asm) + asm_fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, name); + asm_fprintf (asm_out_file, "\n"); +} + +/* This function is used to emit an AEABI subsection with vendor name, + optional status and value type. + example: .aeabi_subsection .aeabi-feature-and-bits, 1, 0 */ + +void +aarch64_emit_aeabi_subsection (const char *name, uint8_t num, uint8_t val) +{ + asm_fprintf (asm_out_file, "\t.aeabi_subsection %s, %u, %u\n", + name, num, val); +} + + /* Implements TARGET_ASM_FILE_START. Output the assembly header. */ static void @@ -24803,6 +24834,16 @@ aarch64_start_file (void) asm_fprintf (asm_out_file, "\t.arch %s\n", aarch64_last_printed_arch_string.c_str ()); + /* Check whether the current assembly supports gcs build attributes, if not + fallback to .note.gnu.property section. */ +#if (HAVE_AS_AEABI_BUILD_ATTRIBUTES) + if (aarch64_gcs_enabled ()) + { + aarch64_emit_aeabi_subsection (".aeabi-feature-and-bits", 1, 0); + aarch64_emit_aeabi_attribute ("Tag_Feature_GCS", 3, 1); + } +#endif + default_file_start (); } diff --git a/gcc/configure b/gcc/configure index 8ed47b4dadb..62d9ba4fdab 100755 --- a/gcc/configure +++ b/gcc/configure @@ -28035,6 +28035,44 @@ if test $gcc_cv_as_aarch64_picreloc = yes; then $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h +fi + + # Check if we have binutils support for AEABI build attributes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for support of AEABI build attributes" >&5 +$as_echo_n "checking assembler for support of AEABI build attributes... " >&6; } +if ${gcc_cv_as_aarch64_aeabi_build_attributes+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_aarch64_aeabi_build_attributes=no + if test x$gcc_cv_as != x; then + $as_echo ' + .set ATTR_TYPE_uleb128, 0 + .set ATTR_TYPE_asciz, 1 + .set Tag_Feature_foo, 1 + .aeabi_subsection .aeabi-feature-and-bits, 1, ATTR_TYPE_uleb128 + .aeabi_attribute Tag_Feature_foo, 1 + ' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + gcc_cv_as_aarch64_aeabi_build_attributes=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aarch64_aeabi_build_attributes" >&5 +$as_echo "$gcc_cv_as_aarch64_aeabi_build_attributes" >&6; } +if test $gcc_cv_as_aarch64_aeabi_build_attributes = yes; then + +$as_echo "#define HAVE_AS_AEABI_BUILD_ATTRIBUTES 1" >>confdefs.h + fi # Enable Branch Target Identification Mechanism and Return Address diff --git a/gcc/configure.ac b/gcc/configure.ac index 8a5fed516b3..f4b1343ca70 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4387,6 +4387,16 @@ case "$target" in ldr x0, [[x2, #:gotpage_lo15:globalsym]] ],,[AC_DEFINE(HAVE_AS_SMALL_PIC_RELOCS, 1, [Define if your assembler supports relocs needed by -fpic.])]) + # Check if we have binutils support for AEABI build attributes. + gcc_GAS_CHECK_FEATURE([support of AEABI build attributes], gcc_cv_as_aarch64_aeabi_build_attributes,, + [ + .set ATTR_TYPE_uleb128, 0 + .set ATTR_TYPE_asciz, 1 + .set Tag_Feature_foo, 1 + .aeabi_subsection .aeabi-feature-and-bits, 1, ATTR_TYPE_uleb128 + .aeabi_attribute Tag_Feature_foo, 1 + ],,[AC_DEFINE(HAVE_AS_AEABI_BUILD_ATTRIBUTES, 1, + [Define if your assembler supports AEABI build attributes.])]) # Enable Branch Target Identification Mechanism and Return Address # Signing by default. AC_ARG_ENABLE(standard-branch-protection, diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/aarch64-build-attributes.exp b/gcc/testsuite/gcc.target/aarch64/build-attributes/aarch64-build-attributes.exp new file mode 100644 index 00000000000..d0caf81c0cf --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/aarch64-build-attributes.exp @@ -0,0 +1,35 @@ +# Copyright (C) 2024 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# GCC testsuite that uses the `dg.exp' driver. + +# Exit immediately if this isn't an AArch64 target. +if ![istarget aarch64*-*-*] then { + return +} + +# Load support procs. +load_lib gcc-dg.exp + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ + "" "" + +# All done. +dg-finish diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c new file mode 100644 index 00000000000..26938d84dab --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-gcs.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && { aarch64_gas_has_build_attributes } } } } */ +/* { dg-options "-mbranch-protection=gcs -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0" } } */ +/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x4\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(GCS\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c new file mode 100644 index 00000000000..6a41b52d298 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/build-attribute-standard.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && aarch64_gas_has_build_attributes } } } */ +/* { dg-options "-mbranch-protection=standard -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler "\.aeabi_subsection \.aeabi-feature-and-bits, 1, 0" } } */ +/* { dg-final { scan-assembler "\.aeabi_attribute 3, 1\t\/\/ Tag_Feature_GCS" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x7\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI, PAC, GCS\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-bti.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-bti.c new file mode 100644 index 00000000000..013c76e5a2a --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-bti.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && { ! aarch64_gas_has_build_attributes } } } } */ +/* { dg-options "-mbranch-protection=bti -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler-not "\.aeabi_subsection" } } */ +/* { dg-final { scan-assembler-not "\.aeabi_attribute" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x1\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-gcs.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-gcs.c new file mode 100644 index 00000000000..954bf3ac8c3 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-gcs.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && { ! aarch64_gas_has_build_attributes } } } } */ +/* { dg-options "-mbranch-protection=gcs -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler-not "\.aeabi_subsection" } } */ +/* { dg-final { scan-assembler-not "\.aeabi_attribute" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x4\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(GCS\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-pac.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-pac.c new file mode 100644 index 00000000000..10195ecdbd9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-pac.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && { ! aarch64_gas_has_build_attributes } } } } */ +/* { dg-options "-mbranch-protection=pac-ret -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler-not "\.aeabi_subsection" } } */ +/* { dg-final { scan-assembler-not "\.aeabi_attribute" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x2\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(PAC\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-standard.c b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-standard.c new file mode 100644 index 00000000000..52cad2863f2 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/build-attributes/no-build-attribute-standard.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { aarch64*-*-linux* && { ! aarch64_gas_has_build_attributes } } } } */ +/* { dg-options "-mbranch-protection=standard -dA" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler-not "\.aeabi_subsection" } } */ +/* { dg-final { scan-assembler-not "\.aeabi_attribute" } } */ +/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" } } */ +/* { dg-final { scan-assembler "\.word\t0x7\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI, PAC, GCS\\)" } } */ \ No newline at end of file diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d113a08dff7..457aa71e860 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -12031,6 +12031,22 @@ proc check_effective_target_aarch64_tiny { } { } } +# Return 1 if Gas supports AEABI build attributes on AArch64 target +proc check_effective_target_aarch64_gas_has_build_attributes { } { + if { ![istarget aarch64*-*-*] } { + return 0 + } + + return [check_no_compiler_messages aarch64_gas_has_build_attributes object { + /* Assembly */ + .set ATTR_TYPE_uleb128, 0 + .set ATTR_TYPE_asciz, 1 + .set Tag_Feature_foo, 1 + .aeabi_subsection .aeabi-feature-and-bits, 1, ATTR_TYPE_uleb128 + .aeabi_attribute Tag_Feature_foo, 1 + }] +} + # Create functions to check that the AArch64 assembler supports the # various architecture extensions via the .arch_extension pseudo-op.