From patchwork Fri Jul 19 14:54:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1962524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=mGqvPV5w; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=mGqvPV5w; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WQXm337Hjz1xpQ for ; Sat, 20 Jul 2024 00:55:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A286384A47A for ; Fri, 19 Jul 2024 14:55:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20618.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::618]) by sourceware.org (Postfix) with ESMTPS id 9E3F0384A4AF for ; Fri, 19 Jul 2024 14:54:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E3F0384A4AF 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 9E3F0384A4AF Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2612::618 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721400898; cv=pass; b=lsRzJQm2qQVNf7RgVUiM6uy8KPDnW16RJcWucExN20sJhsLRFwIfac9awt96A0J2V8Yd61GG1GmdMHhGDsno3iVY6nUze2aUn2FpYayk+qt4P4QOXoLcoNAVAcQXxE38JpMDu63YWl0vxzxv+0mvnxVqXGiMGulqZDb5WeTp4kg= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721400898; c=relaxed/simple; bh=LY0js3LksR2Nn//YJJfqizeF6+slB7nET5AkP7YhWC8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=fEXMJwFwl4pWrawmRVuHxwYvTq33oSyycygUxqXXCXn5IVpsluihBH0J4sjHViRpPSsKz4fymVEdTaKju6uR9Krmvkezh/qJq8IpezUuLKPM31KtmRNJik2tyYNT2L2FQOs5xqN0hzcIhPo+bGzzy5yU7DDXtKEKx2U3YXvsGrY= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=BuqIF2nn3wt8SleBJRon4LC2ilXKAdfp1KmVJqz+UJqUh2BnksjAzuF9ESzxFzcEeziq1s3ubpiODr7qd7yPxVfUjdSs6vkfuscTESS+2yZlPrmShbG35NOnMjpBKUDS4M0Pw+otAFlwNqcRy1cwgX60C6wH+3QQDtiwl2Ym/yrE167gdWEpeHeByeiuyqUwCFOLsewT994h3fDqVZgTIdMs/8z7zir9fqazBzFME3tnN020x64opkvfeHHcYrJ9pBrtA/yM4p6ni6ADp1KS6kp0vbWy3Pebj20nJpzmqgVqcluxIf/50BkhTyHwadnsuoRmw/+nzjeJiAuxudD15Q== 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=dNVIPrBySdPOviVmp1c+4NEaGW64IZ0xFX4jrdC2K/Q=; b=xQ18VyTDC4LKbqKDvU+OFqYaEizga7rbPSfUqmZJfnop4RhgEPYJ7ha4Oi1ge4QRkIg345L0wP9eKzxfAVqLp/0miuKsCCIZ7e8nvugH9YO99QDwBsux8r6g2ZWKSzLKQwM/33cmvAiv7mDwK+kRt7QNdDSGmT7ARLhxphpGybcaJdVfA7QGZOR6DMu0AD1+/vfFp0uyGvgZ6rmCkvhzEC8oUJOHYWiFQ9PzGdw9ZgPXoS5IAPa63VxYp2s5crAH5eAT2cr7d/OZoRDTXS7xBG7Op4LnV4o0ZW5IOBnfQbdHn7L7B26DFNtPYQxhM6G6Qci2pZaU67pajQgHLYQyoA== 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=dNVIPrBySdPOviVmp1c+4NEaGW64IZ0xFX4jrdC2K/Q=; b=mGqvPV5wmnGSpMoCjb7/5uvfj8tlTawQrwaD9RjgRfgCxqh2ghApXXvSrauFjBgi4vrAly/YtzDbZF/u3cIeNMEp6XbdfdTt2icYBa+WackuJ3VD630XEMH9i++yXNT7QPuMs77VFx6YWsxR+R1b0gW2VS4jd3aS2uR8qnV7L+Q= Received: from DU7P191CA0005.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:54e::28) by PA6PR08MB10814.eurprd08.prod.outlook.com (2603:10a6:102:3d7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14; Fri, 19 Jul 2024 14:54:50 +0000 Received: from DB5PEPF00014B94.eurprd02.prod.outlook.com (2603:10a6:10:54e:cafe::cf) by DU7P191CA0005.outlook.office365.com (2603:10a6:10:54e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16 via Frontend Transport; Fri, 19 Jul 2024 14:54:50 +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 DB5PEPF00014B94.mail.protection.outlook.com (10.167.8.232) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Fri, 19 Jul 2024 14:54:50 +0000 Received: ("Tessian outbound 93748f77c01b:v365"); Fri, 19 Jul 2024 14:54:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d2c4675e8edf97f4 X-CR-MTA-TID: 64aa7808 Received: from Le2e820c5afda.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 93F1B22C-8353-48B5-B218-2CBD1C7AC729.1; Fri, 19 Jul 2024 14:54:40 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Le2e820c5afda.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 19 Jul 2024 14:54:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ewAG9Opvgve371u/6MAZrZDGiQCPHmOsKMt0UIjLZ8zsbOAAdA6JMaJpI58doBdPlAlFG5DPI+SqG/vTfBw/JpaZz8aKgtVtvwPQgcs/YHh1JSFJ/ySH11pZV/Vl36+Jd3BRCLIX/VcWuaWMGw/IdGtUe4OvRKm1Z+c/qDPtlmJN1U1bvNSPpmRV3IbrCvWYYrVa72a5ofFsGZ1Am/KQPgX1C3Ou74c5OjSLF24dkAQCTwuE6mB2w15nVsAHX56ieFlwr2PkHXyhkXx3ksZN6FYnn1SRYHKNlHHrlruPAMZB/dJzVTDaeQkmaacHb4Foz6rkBYJKxtippbsWNbcYpA== 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=dNVIPrBySdPOviVmp1c+4NEaGW64IZ0xFX4jrdC2K/Q=; b=qZ8ymsxyFeLFaY6RQiGNYGYQ2iHaY2AphKDBos+0lxCrlC+XdZ9T7DmFcz8p/P5pfbF+rYfKe7NmCKsOa0OV/oVp2PCe4Wi59aGjZvrSWhn2BgOjza8OFe6wy5sNJhmV9AGZKiMtwJ8kQBSiLhboEgTPQf+7qZoetO05ztvKaAkr+arlTH6T//Z/E8YHq2rlnKXuwgrdYDtLXAgOFn6/P1iw2OFpfexgM+RYyzPF5YY1nPIkoxDf43L6qeFy+t6PbZ52t0oU7F3wgfEsEFfRz328chCOUAi0tnTq9ilHuhEkzQJwtHlsqSLbf7Q9CEtHdXp2Hga3U90b47LJPAUH7g== 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=dNVIPrBySdPOviVmp1c+4NEaGW64IZ0xFX4jrdC2K/Q=; b=mGqvPV5wmnGSpMoCjb7/5uvfj8tlTawQrwaD9RjgRfgCxqh2ghApXXvSrauFjBgi4vrAly/YtzDbZF/u3cIeNMEp6XbdfdTt2icYBa+WackuJ3VD630XEMH9i++yXNT7QPuMs77VFx6YWsxR+R1b0gW2VS4jd3aS2uR8qnV7L+Q= Received: from DUZPR01CA0280.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b9::26) by DU5PR08MB10550.eurprd08.prod.outlook.com (2603:10a6:10:528::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Fri, 19 Jul 2024 14:54:37 +0000 Received: from DB5PEPF00014B8F.eurprd02.prod.outlook.com (2603:10a6:10:4b9:cafe::4) by DUZPR01CA0280.outlook.office365.com (2603:10a6:10:4b9::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20 via Frontend Transport; Fri, 19 Jul 2024 14:54:37 +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 DB5PEPF00014B8F.mail.protection.outlook.com (10.167.8.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Fri, 19 Jul 2024 14:54:37 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 19 Jul 2024 14:54:36 +0000 Received: from PW070M4K.cambridge.arm.com (10.57.76.129) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 19 Jul 2024 14:54:36 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Szabolcs Nagy , Jakub Jelinek , Matthieu Longo Subject: [PATCH v1 0/3][libgcc] store signing key and signing method in DWARF _Unwind_FrameState Date: Fri, 19 Jul 2024 15:54:01 +0100 Message-ID: <20240719145404.683815-1-matthieu.longo@arm.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB5PEPF00014B8F:EE_|DU5PR08MB10550:EE_|DB5PEPF00014B94:EE_|PA6PR08MB10814:EE_ X-MS-Office365-Filtering-Correlation-Id: 24eb5817-4c9f-49c3-7373-08dca802bdcb 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|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info-Original: QTOnODpB9gTlPlAuqs3dYotGhDmGn2ncn8nTWjgQxylUdWiuxEEMkHX5ZuL/T7ymc2Zh6IT4EOoyujXA4z0Tre+23VLVfGzU6PqU0YCop9EokFkVBlzEC5tr+Pqy18i/fcdftSYErPxI5bNsoebTFq+VLa7MxbX4Hgc8HccvMlNOt47ElFYKPtWMYl77uWeRu5UyJGOSTiirmlP3zt2dG0IAVYQxpD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diXSFbWrgiU8QLY+O5ZvTcxZjUusXBvTF5/FUjQ64XIcQAiAmbqHo4jMn0qA1X1cDo5IrVPCLdEJpebpqnzzJulXLnrL3hZxDa1DZwDkGgvaQbk5flSWF8tFHg6hSExaYH3wPcDnCPwIlics64HEZONLDQ7H02pONE 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)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5PR08MB10550 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4b9::26]; domain=DUZPR01CA0280.eurprd01.prod.exchangelabs.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B94.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 18d2243f-5c88-4afb-3a8b-08dca802b5a9 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|34020700016|35042699022|376014|82310400026; X-Microsoft-Antispam-Message-Info: 4usTKxUUpZM6nj1S0AyQS7PqtC4YU2hntT8CYWRg9hsqkMdLFJiNIvRRn7hZhaGaPpjVPcxg7ac7NNLwgzSgPHWK6HtR+3HTxaeP0q5zm4LYWdqI9jVymtNKRKMUg9QFWL3Ft73/GqFowyV8gKb0NHwJQUcviuEgWrjl6eWbF53zGKvS3v00Rhg/PsLr3dc+QztsilknJQJUlvmHciYUAhWGWo5+a1jeektfGodEcg+592Gx4OyUE1oizmFx8FUWwcC+KFUn+c0SqHP9UwHeXx7F4SXRWG6I69H6otE4BEqee00fw50KZn3Y04lM7T/RZgzgWBkOzqJaP+940u88KZ7rSJHFXT8+qxvZi6iKIlDjOctGeniaIu3zTzyCVQdK+PHTfTj498rG9h8/0FUnucaeZHwX/o1awbVGmrKtSuiWiiA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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)(1800799024)(36860700013)(34020700016)(35042699022)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 14:54:50.7239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24eb5817-4c9f-49c3-7373-08dca802bdcb 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: DB5PEPF00014B94.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR08MB10814 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=no 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~incoming=patchwork.ozlabs.org@gcc.gnu.org This patch series is only a refactoring of the existing implementation of PAuth and returned-address signing. The existing behavior is preserved. 1. aarch64: store signing key and signing method in DWARF _Unwind_FrameState _Unwind_FrameState already contains several CIE and FDE information (see the attributes below the comment "The information we care about from the CIE/FDE" in libgcc/unwind-dw2.h). The patch aims at moving the information from DWARF CIE (signing key stored in the augmentation string) and FDE (the used signing method) into _Unwind_FrameState along the already-stored CIE and FDE information. Note: those information have to be saved in frame_state_reg_info instead of _Unwind_FrameState as they need to be savable by DW_CFA_remember_state and restorable by DW_CFA_restore_state, that both rely on the attribute "prev". Those new information in _Unwind_FrameState simplifies the look-up of the signing key when the return address is demangled. It also allows future signing methods to be easily added. _Unwind_FrameState is not a part of the public API of libunwind, so the change is backward compatible. A new architecture-specific handler MD_ARCH_EXTENSION_FRAME_INIT allows to reset values in the frame state and unwind context if needed by the architecture extension before changing the frame state to the caller context. A new architecture-specific handler MD_ARCH_EXTENSION_CIE_AUG_HANDLER isolates the architecture-specific augmentation strings in AArch64 backend, and allows others architectures to reuse augmentation strings that would have clashed with AArch64 DWARF extensions. aarch64_demangle_return_addr, DW_CFA_AARCH64_negate_ra_state and DW_CFA_val_expression cases in libgcc/unwind-dw2-execute_cfa.h were documented to clarify where the value of the RA state register is stored (FS and CONTEXT respectively). 2. libgcc: hide CIE and FDE data for DWARF architecture extensions behind a handler. This patch provides a new handler MD_ARCH_FRAME_STATE_T to hide an architecture-specific structure containing CIE and FDE data related to DWARF architecture extensions. Hiding the architecture-specific attributes behind a handler has the following benefits: 1. isolating those data from the generic ones in _Unwind_FrameState 2. avoiding casts to custom types. 3. preserving typing information when debugging with GDB, and so facilitating their printing. This approach required to add a new header md-unwind-def.h included at the top of libgcc/unwind-dw2.h, and redirecting to the corresponding architecture header via a symbolic link. An obvious drawback is the increase in complexity with macros, and headers. It also caused a split of architecture definitions between md-unwind-def.h (types definitions used in unwind-dw2.h) and md-unwind.h (local types definitions and handlers implementations). The naming of md-unwind.h with .h extension is a bit misleading as the file is only included in the middle of unwind-dw2.c. Changing this naming would require modification of others backends, which I prefered to abstain from. Overall the benefits are worth the added complexity from my perspective. 3. libgcc: update configure (regenerated by autoreconf) Regenerate the build files. ## Testing Those changes were testing by covering the 3 following cases: - backtracing. - exception handling in a C++ program. - gcc/testsuite/gcc.target/aarch64/pr104689.c: pac-ret with unusual DWARF [1] Regression tested on aarch64-unknown-linux-gnu, and no regression found. [1]: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/594414.html Ok for master? I don't have commit access so I need someone to commit on my behalf. Regards, Matthieu. Matthieu Longo (3): aarch64: store signing key and signing method in DWARF _Unwind_FrameState libgcc: hide CIE and FDE data for DWARF architecture extensions behind a handler. libgcc: update configure (regenerated by autoreconf) libgcc/Makefile.in | 6 +- libgcc/config.host | 13 +- libgcc/config/aarch64/aarch64-unwind-def.h | 41 ++++++ libgcc/config/aarch64/aarch64-unwind.h | 150 +++++++++++++++++---- libgcc/configure | 2 + libgcc/configure.ac | 1 + libgcc/unwind-dw2-execute_cfa.h | 34 +++-- libgcc/unwind-dw2.c | 19 ++- libgcc/unwind-dw2.h | 19 ++- 9 files changed, 233 insertions(+), 52 deletions(-) create mode 100644 libgcc/config/aarch64/aarch64-unwind-def.h