From patchwork Mon Mar 10 17:51:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 107599 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 AA5C03858CDB for ; Mon, 10 Mar 2025 18:04:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA5C03858CDB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=ZM4cuwnv; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=ZM4cuwnv X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20617.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::617]) by sourceware.org (Postfix) with ESMTPS id BCB2F3858CD9 for ; Mon, 10 Mar 2025 17:54:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BCB2F3858CD9 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 BCB2F3858CD9 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::617 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1741629283; cv=pass; b=EtBxqQxRH6pBQrljclCfJiR1tKYgUxcT9bgsR2ps8HBNhF8M78vsnC1kkODioAgkTkNrwF2OUKZI8Tbzk1yz+27qZeNSAqD6PzG16TkULH59dGBqLOOaCaeWdY9uXwPis0NcNbzMQ5bfmcfEztFoKdp8Iv8NDa6XVSBGbZSpy/Q= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1741629283; c=relaxed/simple; bh=huEMV48iZAIiCXuDN9+5l852FRyrarkneu9yA0Q1zHM=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ZzTETrU+F719vVIwaK15jy3ZR6jYlyu1jEJ8D0SFfsrori/Doa+aHp27USiRUfsw03Tga3Wfw6oaJOqsRSwMWQtBoNbXSk3Ndp06tyLpGwnrvKBhtsrLQTheZD10UDLS+xzWZENMiUr8pOnz61S9gNBTKytqZxE5xyr0DaYx4u0= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCB2F3858CD9 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=uj+IaMGrH1UbOIcQgP8jC3DeB4UDoCaSHwKVIieqOOEO33bQJoVolQ3w0zs7HPgPTHMMoY9ik5pTZCOWJEXgla45OZVG1/AXZeuaDdUAQieKKj158II2oduF4jn1YkV9KXuDC08myyVTjTgG1IFi4FTIWc3SME1ZKlO8Vy0ywjgxA1ZHAuT59BzcYYyQWbD+O+yqzmfnptgu9Xaok6l+KMlX1wSxOjm2SMDE7jOJvecXletXPKGq0gmuTc9UkJEnhR7KdzHK498FOxFSfOnKlnlB9YpCNzc3d09ccPWAcB9nh0yubqX5uz+8rQmaIsjuwGjDdCL8083RJ0mF9/X9dw== 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=TgUBmLYrfOpn8LmnKJ0y8zOTdE4Jwhykyy/eCVta7HU=; b=Eq3u7E9trsyAzhvdxzy9J/T9qNiFl1bcVEFeWHR4F+pBnOY/4AHzYSPem67+IRLUw+wQ/1D8ue/FcyJ/UMIdbKxbK3Ijyb2iV/equgpQvO6Vp7A3Qv3AaE2CsGURP2/+7MaJN888z2RXkTtqqhyxPFJOGo9o5BfJBLX2PpGMeXGl1niYAjP+JOSAn90GYcHR+FaaD9UrHOSeV8X8m38sGUsBkoto2ft+YsJPsRtgOJZArr0DPdpiIWFN6fv7BD9bbEIBRcdJQka3YitD/bfeJSgT/HewoaOFfXNbp1dbBbDW7s27MP1BvJSLCT5Dd4jMCu3me8nYYEWstU+bnPQJ+w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=0 ltdi=1) 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=TgUBmLYrfOpn8LmnKJ0y8zOTdE4Jwhykyy/eCVta7HU=; b=ZM4cuwnvPc5Or1mkd8pGmzkLQ6Krt/d6onh5MZ+bmPy/YaMIZm5iRvZf97VJGQ42y396lrwRKOt020u/xELjswM1aRHDrmxR7h5ZHmlpZ8wTp2Y7sg/49oa30gDhYmwuaK2f3hEkjHOz3uQ7dcmgfezUbTJwoI5AzDeRMgaWbwc= Received: from AS9PR04CA0086.eurprd04.prod.outlook.com (2603:10a6:20b:50e::24) by AM8PR08MB5842.eurprd08.prod.outlook.com (2603:10a6:20b:1d7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.27; Mon, 10 Mar 2025 17:54:37 +0000 Received: from AM3PEPF0000A796.eurprd04.prod.outlook.com (2603:10a6:20b:50e:cafe::3f) by AS9PR04CA0086.outlook.office365.com (2603:10a6:20b:50e::24) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8511.24 via Frontend Transport; Mon, 10 Mar 2025 17:54:37 +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 AM3PEPF0000A796.mail.protection.outlook.com (10.167.16.101) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8534.20 via Frontend Transport; Mon, 10 Mar 2025 17:54:35 +0000 Received: ("Tessian outbound 7c48d84d1965:v585"); Mon, 10 Mar 2025 17:54:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8ff5e8ed673c317e X-TessianGatewayMetadata: d7I+b0xrKIo0ywLQE7qc1u6T6u24Sd+AJ2MUHCtbDGRcAEb6vHO89/8WIMl+lDax4cnoxNfuyFAp8oyBqgTM/Qlie3xJMoDv2Yu52lDOCsC4NAEEy/NrtHu3purAfH41jpfu18pyBtQvL7O6iMAoUOkw+GwE82vCqoCkHYPydAY= X-CR-MTA-TID: 64aa7808 Received: from L200465245386.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F6CB811B-EEF1-4574-8FC8-5120AF565AF3.1; Mon, 10 Mar 2025 17:54:28 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L200465245386.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 10 Mar 2025 17:54:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=THXO3m2+82yLbs6HXhs91Q/YPnVu8q5Q5Pa+1qQbRuQYRDZEEmwJJ2ZO+TurP0z75G3ppASd8U4K3QwgoJ1iQxtKRHCeDqb8nUOAadHgnrkdj1MGBYRqcnds/wIe4itoCdkCGTLj599AnFEGqMLAn27ysXTGsz5TZVsZBLx9aXMakDF9GKE4Pcehl80G6p7Htq5fIov9w8fqL824AvKZpA226e3KRyTi8SVoGd5eafejdkMfz0dWc7DcEOc4jwrbzQzeISN+kOPPZphYIJaMx2IDX/zHUIrmfXUquIm6f/jx5r3OjA3QZ4X6djc/nc09ZUx9RbeCQH0AKebHsIv+Fw== 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=TgUBmLYrfOpn8LmnKJ0y8zOTdE4Jwhykyy/eCVta7HU=; b=Wrlx6UintYGVdeWLYu9+Z3FAAIKfbOwXzS2WJ/MSsjiV3jHCs4drCSz0VQUnYOZ8GBMjJ8OiPrd7XwMQ607j934rVh1GDE4qWCSBLisBSpkqrj4EhZrvgW37vwXEkaYjgQZLnKmGZryE4gosVzX3i5QPLD4OxYBDePGbTg6EuABkfVbPLuBrSH+ob0zDrvUVHiOYqRK8VYXJi3FRUzk42H1GsxTou3L903sFoXZ7ofesplJPla3UndmR34Hu4K1ke8wwfZe3k9uLAML6qgji82q3pgafMmN+dcOZ+SsUmarlANVO/EGvJMmY0BR1hd728WsjuSMgk5iX3LNtkqBREg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=fail (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=TgUBmLYrfOpn8LmnKJ0y8zOTdE4Jwhykyy/eCVta7HU=; b=ZM4cuwnvPc5Or1mkd8pGmzkLQ6Krt/d6onh5MZ+bmPy/YaMIZm5iRvZf97VJGQ42y396lrwRKOt020u/xELjswM1aRHDrmxR7h5ZHmlpZ8wTp2Y7sg/49oa30gDhYmwuaK2f3hEkjHOz3uQ7dcmgfezUbTJwoI5AzDeRMgaWbwc= Received: from AS8P189CA0008.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:31f::16) by AM9PR08MB6001.eurprd08.prod.outlook.com (2603:10a6:20b:2d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.27; Mon, 10 Mar 2025 17:54:22 +0000 Received: from AM4PEPF00027A63.eurprd04.prod.outlook.com (2603:10a6:20b:31f:cafe::42) by AS8P189CA0008.outlook.office365.com (2603:10a6:20b:31f::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8511.27 via Frontend Transport; Mon, 10 Mar 2025 17:54:22 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arm.com; Received-SPF: Fail (protection.outlook.com: domain of arm.com does not designate 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; Received: from nebula.arm.com (172.205.89.229) by AM4PEPF00027A63.mail.protection.outlook.com (10.167.16.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8534.20 via Frontend Transport; Mon, 10 Mar 2025 17:54:22 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX05.Arm.com (10.240.25.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 10 Mar 2025 17:54:11 +0000 Received: from PW070M4K.arm.com (10.57.84.208) by mail.arm.com (10.240.25.134) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 10 Mar 2025 17:54:11 +0000 From: Matthieu Longo To: CC: Alan Modra , Richard Earnshaw , Matthieu Longo Subject: [PATCH v0 14/15] ld's BAs merge saga, step two: AArch64 backend's support for AEABI-specific BAs Date: Mon, 10 Mar 2025 17:51:27 +0000 Message-ID: <20250310175131.1217374-15-matthieu.longo@arm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310175131.1217374-1-matthieu.longo@arm.com> References: <20250310175131.1217374-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00027A63:EE_|AM9PR08MB6001:EE_|AM3PEPF0000A796:EE_|AM8PR08MB5842:EE_ X-MS-Office365-Filtering-Correlation-Id: 24d8a962-11b3-412f-cf42-08dd5ffc9efb x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026|13003099007; X-Microsoft-Antispam-Message-Info-Original: 7aT7Y49bzNQFy2Wlq2E+X02IAVdPXskSpirqBCunhpB2dki4aPvihf2NchX3K/t748MTrfoRSIWMcY9aqBx+tuf/1Uay0M+vqJVC8TkrpUj9k2DQmqwVBKZvWE7iV6RKvs/HuermhD2kY7oS/wFjW053O6sZ+RgW7xmbcAAlb1tNu+2aFKn9/HR/QoRD6WP1LIGusRK+WJIY4vbFMghsBycLm86EXcCvFU6jzlDX9KH5I4LytvsWIb/mrEtU9pPcmOkxx1VhenJbdINj0HsyJfxbOrfoOwMlr9cnfJf8wmk93bKdZh4AX0UUScjsM42ehYeEx33pHP38fLZuD82FYWMhK+59bDDLdlrgoyF+4WodX/9p2q++lfF24wcNFdgmHJ5zKDO72atVjvD/qNjPJeVBL5YFaPkGGxA6ZLh8i/X1fldrCL7xwWLascwMRV8x68ymIPL/5nG40U6+oz5btriDw6McsU0G5p8mjXoUpDEPcAZzQGr2rIWb6ctUnXLB65DmwYfch3MjuLfX9TUvOwhQ7EOEFUMFsdVWZCgI0iV5pnyn8x4Ip8ooNT97lgbmSDodM04EHIh8BbhcW7iogFKBTR1xHSoUuYtKEqma94ISctS4Bg3bfpTv9j3Kb/ka3KffrMkVYOHSzjaE/8TGextynoBweatzWgrz29AVDmkQFtM9XOxojB8KN88xHpAAZBKZmHoN9DD8Nb2C+VKEQBz32l85chXJ97yaJbRv08CCmzVBGu55F3GX+PtGD2TWtkqQGGbpfrXXy95vph1rTrzcwDVZC79rfkVePkUBJsYy08uZ7JBYlL2zULWd+Atfo86OotT0n7c2LYJv3kxvNfY8rgsFZTHW9+jOozjT7lgZyic/rwZG5LdYXw/Q1IaTyMIfjFejUxy8ZqojM4timIsvs6ax5Q9VCCeYF2jc/qx5pPGRsdsgcAB0MPgOtr3SctUIQG1+a9b6DA7O/bbu57OhpuY4RiGekEVjqbHUxcvH+hQKeIeGFrAXtSJrvNfE7NGD4p3n/W5zhETTRGBc5YViXD3gQ8Sixd2MTI0FXxxF3za4fS+4zw3uhyP6gWM4feNGdVjlJ6GutMd+ETjI1peeCuJyOSYY8wJ2GoHI7ZmXlwGeF/vjNbocHkQyGfOG8tTO5Wg8YBwkxiK7Iu9vVkoEVTEeOO+wtLyD4NJ+QNYm9pvay4EtP0x6lrUuqsO65WH++9KDmGU21WVI7MhQlhFMz7+UB3lrCoIf+KWSp7tqFdDwlFbBPyXfSsHjPmg5ZwR0hgy+rYf2yRF3VsDZIdd8RlRIXI37sfcAqIxeWWV1qTALX2voSIxDhpXfAFQWo9SACF8cGcFpA2wJMFKRrszw4lIfFnmUJC9s42l66D9395DUuKM7XXDAHjxaKezSlvBr/8aaT/w0SrYVIZeWyasOo1QDhaKn6IfUzR2379rZTw/bannCTGGVngFxhmhak8xKPU0sHN0pHcPD6pCuCiLE/clYdyKrFX3Zt67LxWc= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6001 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:31f::16]; domain=AS8P189CA0008.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A796.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bcebcada-8df7-45c2-c46e-08dd5ffc96ef X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|35042699022|14060799003|82310400026|13003099007; X-Microsoft-Antispam-Message-Info: v+Full106aPq/E2VcOvAuHrM2m4v+waCteZ37YlsHIGncWV4iWMuSjFsA5iPI8NjZKrj/vFIf+9Em6GDDMruTLnIud99s1VOQZvZRqLg3Y3tKNQZvHkQRfL2IMu/NWRLJbhKPSAsCFbRquU9ZOR60X0Yibqtww/hPa5DF/pJdk5mOrkCI0vcYtzuPjenmE9lK/K3T+3ew58vFqgdhPnn/7XqgP8Qnum4PgWIWEeyHjfD5Y4S86/hLA/puAXECviyBrZp0laQsXGw5UYRVwdGX1Rr/ki4ibINUjeycoHH/DbE9nRTKf7jkke1y5+9AuWg0LgILdjc8HvZr+zzjwHyKpeJfri5Cq/XZVEeIlurfndOZMS49zd9aDWwxYdAx1OfJrvuwkVONzLYZPSK9uoYillOwmOlTFXszXh2WoUusrKsQ6FkCM4zrXxP8v6ZeyOIL6hLefZkyqTLF1VEA/hk7BQZ+9WjHwR4JRMKhg7LmpvecHaMBQnupU9KclteXRgz3VwBNPXfPCtzT7Gql1CXItWCrIDpnotJ362ycHsF3ww5fMNLZ4FBFsnhPSGW40R6Y/P2Np4xWsyXeOc4k6ThOk4t606xzkqIBGOS5wfEOaa7fY8lZPbz9H9PY04TlvA24YIc+ocQQ/vKbf2Z8246DdCCAqxR1+ajuAVyGg3npb/9wP1sk/FLCWLj64U/OycR/Y+v0tEIki3dpvPGyN9gAgNXmXOlzl7QEFXJDK1D4wSZZLoaDTvFOJQ+osN42H4p4p9xm3SC+E9AaMEUkyBJIq1pZ1si8IuMXbc51UgEGHTy52VurW+0qOT9iJF1a9GvsrhmXrt8uUYLVr2PhLoE0tteH06zLvgi34D0YC4Pj2OFmi6HxQfkV8q9oh/ZuI17OlFyRBOGie5zdjPy5772DvgpvbeqrW391vg0LYTSXCA2QcYr2OfyHJjhASiE7veKJ+AwYngsBShV0WgOW4SvgC24d4pukpCQ/Y9xHMY4q62hSQfuD8q/WAaYyIylDaTgCa/jN9uLtKvbwn+3YCCPshq253yvO6vgz9i+xkr+fdPum4p7K9PQ6A4fijuOzTNMSNQhJ3btPVObmmpqelmOaTKqF3ZuFtB520+ePZUH5pB8fR1ClqKbMosHMcvNDtk/0AW+EaLtla6jBTiuto0RHISeEPgCbN6qP4sZF6/ow/ZunZYvCkkwMKQ4v735zR57QjWDCEPyfWecNqZjQPFoVibPHNqXpLbnHoN0PUHtYMAKLBBxnf/65AK5O7KEGWohQJVIk5pOJ8sUZVaPO762K9/dOtHpcRBafx3XkouN0Fbp66zwhdMGxoi5iGjKVKa+G5SqxfEQl1pvfB/H5+F4+44ULmEvPthiqbZO6d0olqD70tT4O72X1iP1oMDgif8AwD1Vvn8cvXtbm8sy30u5sbxAK01NHJHbOcwNIbGn9oINVChgXUR/UCTX5rjHGSxJ7Z5h1iNdWYBLScOK2Z5sH+UDeTa2HpKYjOMXJf202ks= 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(1800799024)(35042699022)(14060799003)(82310400026)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2025 17:54:35.9553 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24d8a962-11b3-412f-cf42-08dd5ffc9efb 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: AM3PEPF0000A796.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5842 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org - declare known subsections and tags for AEABI build attributes. - define AArch64 backend handlers for: - obj_attr_subsection_v2_match_known - obj_attr_v2_default_value - obj_attr_v2_tag_merge - setup_build_attributes - translate_relevant_gnu_props_to_obj_attrs - translate_relevant_obj_attrs_to_gnu_props - set global build attributes from command-line options for BTI and GCS. - translate GNU_PROPERTY_AARCH64_FEATURE_1_AND in input files to its BAs equivalents. - report incompatibilities for BTI and GCS. - set BTI PLT type depending on the merge result. - translate BAs in subsection "aeabi_feature_and_bits" to GNU_PROPERTY_AARCH64_FEATURE_1_AND as GNU properties are required for the runtime linker (it does not understand BAs yet). --- bfd/elfnn-aarch64.c | 101 ++++++++++++++- bfd/elfxx-aarch64.c | 306 ++++++++++++++++++++++++++++++++++++++++++-- bfd/elfxx-aarch64.h | 36 ++++++ 3 files changed, 426 insertions(+), 17 deletions(-) diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 21fc99c4c98..9bb36fd550c 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -5023,27 +5023,54 @@ bfd_elfNN_aarch64_set_options (struct bfd *output_bfd, elf_aarch64_tdata (output_bfd)->no_enum_size_warning = no_enum_warn; elf_aarch64_tdata (output_bfd)->no_wchar_size_warning = no_wchar_warn; + /* The global list of build attributes used to save requested features from + the command-line options. */ + obj_attr_subsection_v2 *attrs_subsection = + _bfd_elf_obj_attr_subsection_v2_init ("aeabi_feature_and_bits", + SUBSEC_PUBLIC, true, ULEB128); + /* Note: gnu_property_aarch64_feature_1_and was initialized to 0 by bfd_zalloc(). */ if (sw_protections->plt_type & PLT_BTI) - elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and - |= GNU_PROPERTY_AARCH64_FEATURE_1_BTI; + { + elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and + |= GNU_PROPERTY_AARCH64_FEATURE_1_BTI; + _bfd_aarch64_record_obj_attr_v2 (attrs_subsection, Tag_Feature_BTI, true); + } + + /* Note: Contrarilly to PLT_BTI, (sw_protections->plt_type & PLT_PAC) == true + does not mean that Tag_Feature_PAC should also be set to true. The PAC + build attribute is only there to mirror the existing GNU properties. + Adding a property for PAC was in retrospect a mistake as it does not carry + valuable information. The only use it does have is informational: if the + property is set on the output ELF object, then someone went to the trouble + of enabling it on all the input objects. */ switch (sw_protections->gcs_type) { case GCS_ALWAYS: - elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and - |= GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + { + elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and + |= GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + _bfd_aarch64_record_obj_attr_v2 (attrs_subsection, Tag_Feature_GCS, true); + } break; case GCS_NEVER: - elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and - &= ~GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + { + elf_aarch64_tdata (output_bfd)->gnu_property_aarch64_feature_1_and + &= ~GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + _bfd_aarch64_record_obj_attr_v2 (attrs_subsection, Tag_Feature_GCS, false); + } break; case GCS_IMPLICIT: /* GCS feature on the output bfd will be deduced from input objects. */ break; } + if (attrs_subsection->size > 0) + LINKED_LIST_APPEND(obj_attr_subsection_v2) ( + &elf_obj_attr_subsections (output_bfd), attrs_subsection); + elf_aarch64_tdata (output_bfd)->sw_protections = *sw_protections; /* Inherit the value from '-z gcs-report' if the option '-z gcs-report-dynamic' was not set on the command line. However, the inheritance mechanism is @@ -10395,7 +10422,8 @@ elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd, return true; } -/* Check if BTI enabled PLTs are needed. Returns the type needed. */ +/* Check if BTI-enabled (and/or PAC-enabled) PLTs are needed. + Returns the type needed. */ static aarch64_plt_type get_plt_type (bfd *abfd) { @@ -10515,6 +10543,41 @@ elfNN_aarch64_backend_symbol_processing (bfd *abfd, asymbol *sym) sym->flags |= BSF_KEEP; } +/* Implement elf_backend_setup_build_attributes for AArch64. */ +static bfd * +elfNN_aarch64_link_setup_build_attributes (struct bfd_link_info *info) +{ + bfd *pbfd = _bfd_aarch64_elf_link_setup_build_attributes (info); + + struct elf_aarch64_obj_tdata * tdata = elf_aarch64_tdata (info->output_bfd); + + /* When BTI is forced on the command line, information flows from plt_type to + the frozen build attributes (a.k.a FROZEN), so plt_type has already been + set and FROZEN don't have any effect on plt_type. + Whereas if BTI is inferred from the input bfds, information flows from + output build attributes to plt_type. If the property GNU_PROPERTY_AARCH64 + _FEATURE_1_BTI has been set on all the input bfds, then BTI is set on the + output bfd and plt_type is updated accordingly. + + Important note: this is not true for GNU_PROPERTY_AARCH64_FEATURE_1_PAC. + See more explanation in bfd_elfNN_aarch64_set_options. */ + obj_attr_subsection_v2 *aeabi_feature_and_bits_subsec = + obj_attr_subsection_v2_find_by_name ( + elf_obj_attr_subsections (info->output_bfd).first_, + "aeabi_feature_and_bits", true); + if (aeabi_feature_and_bits_subsec != NULL) + { + obj_attr_v2 *attr_bti = obj_attr_v2_find_by_tag + (aeabi_feature_and_bits_subsec, Tag_Feature_BTI, true); + if (attr_bti && attr_bti->vals.uint_val == 1) + tdata->sw_protections.plt_type |= PLT_BTI; + } + + setup_plt_values (info, tdata->sw_protections.plt_type); + + return pbfd; +} + /* Implement elf_backend_setup_gnu_properties for AArch64. It serves as a wrapper function for _bfd_aarch64_elf_link_setup_gnu_properties to account for the effect of GNU properties of the output_bfd. */ @@ -10732,9 +10795,27 @@ const struct elf_size_info elfNN_aarch64_size_info = #define elf_backend_symbol_processing \ elfNN_aarch64_backend_symbol_processing +#define elf_backend_setup_build_attributes \ + elfNN_aarch64_link_setup_build_attributes + #define elf_backend_setup_gnu_properties \ elfNN_aarch64_link_setup_gnu_properties +#define elf_backend_translate_relevant_gnu_props_to_obj_attrs \ + _bfd_aarch64_translate_relevant_gnu_props_to_obj_attrs + +#define elf_backend_translate_relevant_obj_attrs_to_gnu_props \ + _bfd_aarch64_translate_relevant_obj_attrs_to_gnu_props + +#define elf_backend_obj_attr_subsection_v2_match_known \ + _bfd_aarch64_obj_attr_subsection_v2_match_known + +#define elf_backend_obj_attr_v2_default_value \ + _bfd_aarch64_obj_attr_v2_default_value + +#define elf_backend_obj_attr_v2_tag_merge \ + _bfd_aarch64_obj_attr_v2_tag_merge + #define elf_backend_merge_gnu_properties \ elfNN_aarch64_merge_gnu_properties @@ -10775,6 +10856,12 @@ const struct elf_size_info elfNN_aarch64_size_info = #define elf_backend_obj_attrs_section_type SHT_AARCH64_ATTRIBUTES #undef elf_backend_obj_attrs_version #define elf_backend_obj_attrs_version 2 +/* Object attributes v2 specific values. */ +#undef elf_backend_obj_attr_v2_known_subsections +#define elf_backend_obj_attr_v2_known_subsections \ + aarch64_obj_attr_v2_known_subsections +#undef elf_backend_obj_attr_v2_known_subsections_size +#define elf_backend_obj_attr_v2_known_subsections_size 2 #include "elfNN-target.h" diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 45a02058e81..31810f9eb19 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -21,6 +21,7 @@ #include "sysdep.h" #include "bfd.h" #include "elf-bfd.h" +#include "elf/aarch64.h" #include "elfxx-aarch64.h" #include "libbfd.h" #include @@ -868,6 +869,279 @@ _bfd_aarch64_elf_check_gnu_properties_linked_dynamic_objects ( pbfd); } +/* Note: this array has to be sorted. */ +static const known_tag_v2 known_tags_aeabi_feature_and_bits [] = +{ + {Tag_Feature_BTI, OBJ_ATTR_TAG_v2(Feature_BTI), .default_value.uint_val = 0}, + {Tag_Feature_PAC, OBJ_ATTR_TAG_v2(Feature_PAC), .default_value.uint_val = 0}, + {Tag_Feature_GCS, OBJ_ATTR_TAG_v2(Feature_GCS), .default_value.uint_val = 0}, +}; +/* This is a required subsection to use PAuthABI (which is currently + unsupported by GCC). A value of 0 for any the tags below means that + the user did not permit this entity to use the PAuthABI. + Note: this array has to be sorted. */ +static const known_tag_v2 known_tags_aeabi_pauthabi [] = +{ + {Tag_PAuth_Platform, OBJ_ATTR_TAG_v2(PAuth_Platform), .default_value.uint_val = 0}, + {Tag_PAuth_Schema, OBJ_ATTR_TAG_v2(PAuth_Schema), .default_value.uint_val = 0}, +}; + +/* Note: this array is exported by the backend, and needs to be sorted. */ +const known_subsection_v2 aarch64_obj_attr_v2_known_subsections[] = +{ + { + .subsec_name = "aeabi_feature_and_bits", + .known_tags = known_tags_aeabi_feature_and_bits, + .optional = true, + .encoding = ULEB128, + .len = sizeof (known_tags_aeabi_feature_and_bits) / sizeof (known_tag_v2), + }, + { + .subsec_name = "aeabi_pauthabi", + .known_tags = known_tags_aeabi_pauthabi, + .optional = false, + .encoding = ULEB128, + .len = sizeof (known_tags_aeabi_pauthabi) / sizeof (known_tag_v2), + }, +}; + +void +_bfd_aarch64_record_obj_attr_v2 (obj_attr_subsection_v2 *subsec, + Tag_Feature_XXX feature_tag, + uint32_t value) +{ + union obj_attr_value_v2 data; + data.uint_val = value; + obj_attr_v2 *attr = _bfd_elf_obj_attr_v2_init (feature_tag, data); + LINKED_LIST_APPEND(obj_attr_v2) (subsec, attr); +} + +/* Translate the relevant GNU properties to object attributes v2. */ +void +_bfd_aarch64_translate_relevant_gnu_props_to_obj_attrs ( + bfd *abfd, + elf_property_list *p) +{ + void + _record_tag_value (obj_attr_subsection_v2 *subsec, + Tag_Feature_XXX tag, + bool value) + { + obj_attr_v2 *attr; + attr = obj_attr_v2_find_by_tag (subsec, tag, false); + if (attr != NULL) + { + if (attr->vals.uint_val != value) + { + /* translate_relevant_gnu_props_to_obj_attrs is only called when + parsing .note.gnu.property section, and this happens before the + parsing of the build attributes. + If we find an existing value for the given object attributes and + this value is different from the new one, it can mean two things: + - either the values are conflicting, and we need to raise an + error. + - either there are several GNU properties AARCH64_FEATURE_1_AND + which were recorded, but its final value is the result of the + merge of those separate values. + For now, only case 2 occurs. */ + uint32_t merged_val = attr->vals.uint_val | value; + _bfd_aarch64_record_obj_attr_v2 (subsec, tag, merged_val); + } + // else: nothing to do + } + else + _bfd_aarch64_record_obj_attr_v2 (subsec, tag, value); + } + + if (p->property.pr_type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) + { + elf_property *prop = &p->property; + BFD_ASSERT (prop->pr_kind == property_number); + + obj_attr_subsection_v2 *subsec = obj_attr_subsection_v2_find_by_name + (elf_obj_attr_subsections (abfd).first_, "aeabi_feature_and_bits", false); + + bool new_subsec = false; + if (subsec == NULL) + { + subsec = _bfd_elf_obj_attr_subsection_v2_init ( + "aeabi_feature_and_bits", SUBSEC_PUBLIC, true, ULEB128); + new_subsec = true; + } + + bool bti_bit = prop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_BTI; + bool pac_bit = prop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_PAC; + bool gcs_bit = prop->u.number & GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + + _record_tag_value (subsec, Tag_Feature_BTI, bti_bit); + _record_tag_value (subsec, Tag_Feature_PAC, pac_bit); + _record_tag_value (subsec, Tag_Feature_GCS, gcs_bit); + + if (new_subsec) + LINKED_LIST_APPEND(obj_attr_subsection_v2) ( + &elf_obj_attr_subsections (abfd), subsec); + } +} + +void +_bfd_aarch64_translate_relevant_obj_attrs_to_gnu_props ( + bfd *abfd, + obj_attr_subsection_v2 *subsec) +{ + /* Note: there is no need to create the GNU properties section here. It will + be handled later by setup_gnu_properties. */ + + if (strcmp (subsec->name, "aeabi_feature_and_bits") == 0) + { + uint32_t gnu_property_aarch64_features = 0; + + for (obj_attr_v2 *attr = subsec->first_; attr != NULL; attr = attr->next) + { + if (attr->tag == Tag_Feature_BTI && attr->vals.uint_val == 1) + gnu_property_aarch64_features |= GNU_PROPERTY_AARCH64_FEATURE_1_BTI; + else if (attr->tag == Tag_Feature_PAC && attr->vals.uint_val == 1) + gnu_property_aarch64_features |= GNU_PROPERTY_AARCH64_FEATURE_1_PAC; + else if (attr->tag == Tag_Feature_GCS && attr->vals.uint_val == 1) + gnu_property_aarch64_features |= GNU_PROPERTY_AARCH64_FEATURE_1_GCS; + } + + /* Note: _bfd_elf_get_property find the existing property, or create one. + The insertion is already done by it. */ + elf_property *prop = + _bfd_elf_get_property (abfd, GNU_PROPERTY_AARCH64_FEATURE_1_AND, 4); + prop->u.number |= gnu_property_aarch64_features; + prop->pr_kind = property_number; + } +} + +/* Check whether a subsection is known, and if so, whether the current + properties of the subsection match the expected ones. + Return True if the subsection is known from the backend, OR all the + properties of the subsection match the expected. False otherwise. */ +bool +_bfd_aarch64_obj_attr_subsection_v2_match_known (struct bfd_link_info *info, + bfd *abfd, + obj_attr_subsection_v2 *subsec) +{ + const known_subsection_v2 *subsec_info = + identify_subsection (get_elf_backend_data (abfd), subsec->name); + + bool match = true; + if (subsec_info == NULL) + return match; + + if (subsec_info->encoding != subsec->encoding) + { + info->callbacks->einfo (_("%X%pB: error: encoding property of subsection " + "'%s' was incorrectly set. Got '%s', expected '%s'.\n"), + abfd, subsec->name, + obj_attr_encoding_v2_to_string (subsec->encoding), + obj_attr_encoding_v2_to_string (subsec_info->encoding)); + match = false; + } + if (subsec_info->optional != subsec->optional) + { + info->callbacks->einfo (_("%X%pB: error: optional property of subsection " + "'%s' was incorrectly set. Got '%s', expected '%s'.\n"), + abfd, subsec->name, + obj_attr_subsection_v2_optional_to_string (subsec->optional), + obj_attr_subsection_v2_optional_to_string (subsec_info->optional)); + match = false; + } + return match; +} + +/* True if the default value for the tag is managed by the backend. + False otherwise. */ +bool +_bfd_aarch64_obj_attr_v2_default_value (struct bfd_link_info *info, + const known_tag_v2 *tag_info, + obj_attr_subsection_v2 *subsec, + obj_attr_v2 *attr) +{ + (void) info; + (void) tag_info; + (void) subsec; + (void) attr; + + /* For now, there is no default value set by the backend. The default BTI and + GCS values are set by the respective command-line options '-z force-bti' + and '-z gcs'. */ + + return false; +} + +/* True, the tag needs to be merged, False don't merge. */ +obj_attr_v2_merge_result +_bfd_aarch64_obj_attr_v2_tag_merge (struct bfd_link_info *info, + bfd *abfd, + obj_attr_subsection_v2 *subsec, + obj_attr_v2 *lhs, obj_attr_v2 *rhs, + obj_attr_v2 *frozen) +{ + obj_attr_v2_merge_result res = { + .merge = false, + .vals.uint_val = 0, + .reason = NONE, + }; + + /* No need to list required sections here, they are handled separately as + they require a perfect one-to-one match for all the tag values. */ + if (strcmp (subsec->name, "aeabi_feature_and_bits") == 0) + { + BFD_ASSERT (subsec->encoding == ULEB128 && subsec->optional); + const known_tag_v2 *tag_info = + known_obj_attr_v2_find_by_tag (get_elf_backend_data (abfd), + subsec->name, lhs->tag); + if (tag_info == NULL) + { + info->callbacks->einfo (_("%pB: warning: cannot merge unknown tag " + "Tag_unknown_%u (=0x%x) in subsection '%s'.\n"), abfd, rhs->tag, + rhs->vals.uint_val, subsec->name); + res.reason = UNSUPPORTED; + return res; + } + + /* For now, there is no different between the tags of this section, all + will be merged in the same way. */ + res = obj_attr_v2_tag_merge_AND (info, abfd, subsec, lhs, rhs, frozen); + + const aarch64_protection_opts *sw_protections + = &elf_aarch64_tdata (info->output_bfd)->sw_protections; + aarch64_feature_marking_report bti_report = sw_protections->bti_report; + aarch64_feature_marking_report gcs_report = sw_protections->gcs_report; + + if ((rhs->tag == Tag_Feature_BTI) && (bti_report != MARKING_NONE) + && (sw_protections->plt_type & PLT_BTI) && (rhs->vals.uint_val == 0)) + _bfd_aarch64_elf_check_bti_report (info, abfd); + + if ((rhs->tag == Tag_Feature_GCS) && (gcs_report != MARKING_NONE) + && (sw_protections->gcs_type == GCS_ALWAYS) && (rhs->vals.uint_val == 0)) + _bfd_aarch64_elf_check_gcs_report (info, abfd); + + /* Make sure that frozen bits don't disappear from REF when it will be + compared to the next file. */ + if (frozen != NULL) + res.vals.uint_val |= frozen->vals.uint_val; + } + else + res.reason = UNSUPPORTED; + + return res; +} + +bfd * +_bfd_aarch64_elf_link_setup_build_attributes (struct bfd_link_info *info) +{ + bfd *pbfd = _bfd_elf_link_setup_build_attributes (info); + + /* Set the flag marking whether the merge of build attributes was done so + that setup_gnu_properties does not raise the same errors/warning again. */ + elf_aarch64_tdata (info->output_bfd)->ba_merge_done = true; + + return pbfd; +} + /* Find the first input bfd with GNU property and merge it with GPROP. If no such input is found, add it to a new section at the last input. Update GPROP accordingly. */ @@ -888,14 +1162,24 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info) Note: If there is no .gnu.note.property section, we might think that elf_properties (res.pbfd) is always NULL. However, this is not always - true. In PR23900: old linkers were treating .note.gnu.property as a - generic note section, so old objects might contain properties inside - .note instead of .note.gnu.property. In this case, the section won't be - detected but the properties are still parsed. Consequently, - elf_properties (res.pbfd) is populated and different from NULL (see - https://sourceware.org/bugzilla/show_bug.cgi?id=23900 for more - details). */ - if (res.sec == NULL && elf_properties (res.pbfd) == NULL) + true for the following reasons: + - PR23900: old linkers were treating .note.gnu.property as a generic + note section, so old objects might contain properties inside .note + instead of .note.gnu.property. In this case, the section won't be + detected but the properties are still parsed. Consequently, + elf_properties (res.pbfd) is populated and different from NULL (see + https://sourceware.org/bugzilla/show_bug.cgi?id=23900 for more + details). + - since the introduction of the build attributes, once the merge + of the BAs is done, some of the BAs can be translated to GNU + properties like GNU_PROPERTY_AARCH64_FEATURE_1_AND. In this case, + we need to check explicitly for the presence of the GNU properties + that might be added by the BAs merge. */ + if (res.sec == NULL + && (elf_properties (res.pbfd) == NULL + || _bfd_elf_find_property (elf_properties (res.pbfd), + GNU_PROPERTY_AARCH64_FEATURE_1_AND, + NULL))) _bfd_aarch64_elf_create_gnu_property_section (info, res.pbfd); /* Merge the found input property with output properties. Note: if no @@ -1110,7 +1394,8 @@ _bfd_aarch64_elf_check_bti_report (struct bfd_link_info *info, bfd *ebfd) { struct elf_aarch64_obj_tdata *tdata = elf_aarch64_tdata (info->output_bfd); - if (tdata->sw_protections.bti_report == MARKING_NONE) + if (elf_aarch64_tdata (info->output_bfd)->ba_merge_done + || tdata->sw_protections.bti_report == MARKING_NONE) return; ++tdata->n_bti_issues; @@ -1144,7 +1429,8 @@ _bfd_aarch64_elf_check_gcs_report (struct bfd_link_info *info, bfd *ebfd) } else { - if (tdata->sw_protections.gcs_report == MARKING_NONE) + if (elf_aarch64_tdata (info->output_bfd)->ba_merge_done + || tdata->sw_protections.gcs_report == MARKING_NONE) return; ++tdata->n_gcs_issues; if (tdata->n_gcs_issues > GNU_PROPERTY_ISSUES_MAX) diff --git a/bfd/elfxx-aarch64.h b/bfd/elfxx-aarch64.h index 506f4a93c9d..c30f41b30c0 100644 --- a/bfd/elfxx-aarch64.h +++ b/bfd/elfxx-aarch64.h @@ -107,6 +107,9 @@ struct elf_aarch64_obj_tdata /* Software protections options. */ struct aarch64_protection_opts sw_protections; + /* The merge of build attributes already occured. */ + bool ba_merge_done; + /* Number of reported BTI issues. */ int n_bti_issues; @@ -209,6 +212,39 @@ _bfd_aarch64_elf_write_core_note (bfd *, char *, int *, int, ...); #define elf_backend_grok_psinfo _bfd_aarch64_elf_grok_psinfo #define elf_backend_write_core_note _bfd_aarch64_elf_write_core_note +extern const known_subsection_v2 aarch64_obj_attr_v2_known_subsections[]; + +extern bfd * +_bfd_aarch64_elf_link_setup_build_attributes (struct bfd_link_info *); + +extern void +_bfd_aarch64_record_obj_attr_v2 (obj_attr_subsection_v2 *, Tag_Feature_XXX, + uint32_t); + +extern void +_bfd_aarch64_translate_relevant_gnu_props_to_obj_attrs (bfd *, + elf_property_list *); + +extern void +_bfd_aarch64_translate_relevant_obj_attrs_to_gnu_props (bfd *, + obj_attr_subsection_v2 *); + +extern bool +_bfd_aarch64_obj_attr_subsection_v2_match_known (struct bfd_link_info *, + bfd *, + obj_attr_subsection_v2 *); + +extern bool +_bfd_aarch64_obj_attr_v2_default_value (struct bfd_link_info *, + const known_tag_v2 *, + obj_attr_subsection_v2 *, + obj_attr_v2 *); + +extern obj_attr_v2_merge_result +_bfd_aarch64_obj_attr_v2_tag_merge (struct bfd_link_info *, bfd *, + obj_attr_subsection_v2 *, obj_attr_v2 *, + obj_attr_v2 *, obj_attr_v2 *); + extern bfd * _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *);