From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 98C203858CDB for ; Fri, 30 Sep 2022 00:05:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98C203858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28TMihJf005146; Fri, 30 Sep 2022 00:05:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=rkrPkQn0q9AbxbEOm+n4NuZD2eeqQGuFeKDfQuM6LPE=; b=pbmNSHoeXaR4jGbwCbfa4Z6RM6M+7rDJVvzFOu/YAQrILhWAw/QaE3Uo2jZEdCNTd7qg 2OKvaYXTHZUuZCX7mYZblgx++MS4658CFBDdjjpE1icUzVbu5+IDY5VPuJ+/i8q4Txn1 u71pUldZHMmqYzgAZ/IGGmlvliEtAQgCZ+SgovA0wMgqjTZp4oR47gNpZxhqo2RvXt9O 6TuyjLZXKORxpixePQjc83piIVhqOLAag64zQleHMaRblcvh6UJJR7E0dCwxs+OG3U+P ilybRoX2+OBFO/HiuQPOfKnTUiu1HwxhyEsveegHl9jjgzbCxONPeB8XGf7xH8ts6u2v YA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3jstet6v6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Sep 2022 00:05:17 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 28TL0s74033653; Fri, 30 Sep 2022 00:05:16 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3jtpv3d6p4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Sep 2022 00:05:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A/i++hM9ZcayjDG2ipmEW3W9lOsZi8kYYm3nNLs2yGXCdaoxj5sN6TEFy5EArchDOvwmn4RugFpXZzuYs6oML74Vz8lt5Z8BtdUlh7iwGRC9u5gd08Cyc4TT6ngtYvIbpyBnehCQUw5Vo0XDcqehAAvHwxB5gYJQaTWlb6ww/StGZMj3iB1FTmEHQqVVPYHTicyDDwZRpokyS/CWDYadyAhpa/kJezLffDV7+lCYLOqUbm0sTiH1GKw+K0Y1QupL28MSFztZcq1zv6FbrvsWPKPTGOlFuM7lPIdaAU/59Zu+cnd9ZFgrjr9ZuymO4e8K9oHM9ENQh2GxaAKhQ0lTyQ== 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=rkrPkQn0q9AbxbEOm+n4NuZD2eeqQGuFeKDfQuM6LPE=; b=V8YPrq00+Ch+FHzUmOhYl5DTJAh8QAqN0rGVkE06tNg/WNpvXwygNWVgYe5qUGqnNl+0wnIqNs5s3lHxm8tA8ZjXTkngR5dnVtY/f6miUyiVCgOY7BMZhDUjERM+dgLewAHXK4bOd3tUAg3FqZIOz/NIWSyw4BYaVEr0K1FNocA4HaEJ52WAOsyoDJ2PHqpPp/WpDjd10oP2KGGEpmCRtRqfgUHE08t1weoeKIHwWH9M3Zq9HgFJRcwuUoycH5j4vlN3kxFW0yHYKgbgTJpUBbrkyZmwCEGe+PM6dQcMT/Imc0dAqM15PNBwC7oeYuB8aZ6EDSaMuBkYXkzPncYOUg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rkrPkQn0q9AbxbEOm+n4NuZD2eeqQGuFeKDfQuM6LPE=; b=ui8meZIA16UDYgTw0K1shzxU0l1kfKgYD567UzbPObj7fMG2xldwAaGz++xlYOOdy29RL2SuuFtwQrFqHEWU1tXr0EqJPucd1iDRbhaoYNG+EA83Nw/dT4lYQq8ZA/yRLifzNCYFNmrizSq7uLhxV/FyMgmzQ9oheyB6cupbkNw= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by SJ0PR10MB6397.namprd10.prod.outlook.com (2603:10b6:a03:449::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Fri, 30 Sep 2022 00:05:04 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::80a7:f7f3:4303:54e4]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::80a7:f7f3:4303:54e4%5]) with mapi id 15.20.5676.017; Fri, 30 Sep 2022 00:05:03 +0000 From: Indu Bhagat To: binutils@sourceware.org Cc: nickc@redhat.com, weimin.pan@oracle.com, Indu Bhagat Subject: [PATCH,V1 00/14] Definition and support for SFrame unwind format Date: Thu, 29 Sep 2022 17:04:26 -0700 Message-Id: <20220930000440.1672106-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW2PR2101CA0009.namprd21.prod.outlook.com (2603:10b6:302:1::22) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|SJ0PR10MB6397:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f615b17-8f7f-4d31-a5e0-08daa2776c3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QA5YfxvoWqvRMB1dgnrRMYe5wgAoaA7pIB6v+5PbYeNtXd2gePlxzjjNcgaAw/pt0me0tpjJOC1A7rWWaHoQycPg/8wr22YAsiWgaLqJyEYaKC6THCFDn9U0lROZbJ6FS/Ly8OKghkrFWiJAEuQcEpk9QxHrxygwuFRmLuFbiwdNk6ufr249lkvYAdh06j7v7V298sfwnRl7Ct7QI2IbJyF1sFTKH6NHP/Uqg4KkCNQg5Os2hioTDyereUASEJCYG+ZYtNmfVP9LmsDe7eVki/bHecErjYQW9eT6WMwNzWumLTDpAnp5Df2uhLvF3FqvBncwGmU/oCLuIar1YuZaNddi+ELBdU8QkRUUViwUSJCY8Ldgu7mjfEwZpsA6LrkPDb0wlgl7/hf83QF5cgMWjtY/kBD481EgFiq6oJZsqAB3X6irLXTNSTWvHdTe49fZzIXriJh+th36ixqpJpW6K0o83IMrUVbq5eyDgb+tUo/bkANAjMEBuC4ILdwvQuBE8gLlqEj1yWfPL6xa8Duslv0/S2RXMCnsUKA63xxqy20IYXOlc08G2xXG5KcYmL+3hDjs2RqxJlMJ032t9jIn9SZQSxZG3SdE/eQS9KDDluiSZY83HC3n8kEEgJnmDvxovAW8nGR/QiGtl+OBPlXKFZOboWraZRR9xEpHzFQPI4K+mJQKphx3sCXYzex2vo8XikpVM+0nesyDFNQo+/rmkBhgs5nMB2NoaKj2NPRZBJU3YAC/JxW7dIbl6lWeCgtt29PZCpN3wbaZDKooilQSco8Rci46XfeHUPyE84qPj/hQ/jSUnL3zjKfN/Gwt7sL6 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)(136003)(376002)(39860400002)(346002)(396003)(366004)(451199015)(30864003)(1076003)(36756003)(83380400001)(2906002)(8676002)(186003)(44832011)(4326008)(66946007)(6916009)(26005)(6512007)(66476007)(66556008)(6666004)(8936002)(107886003)(6506007)(316002)(5660300002)(86362001)(2616005)(41300700001)(6486002)(66899015)(478600001)(966005)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?w/+hrXtWcvixLJk7RNk8KpBEkcgp9EzP4iPGgXeYQp6HEPdjFChZm74DNTlW?= =?us-ascii?Q?rfI3v2QqYAWWW6CL3UVOg3mBTP+y3d1GM0ZnNkLXimRz3frEc5rk3gTonpGb?= =?us-ascii?Q?iuJAkgsvToYCxQQ5vBeNUBVNTTpn164tEvYu19CX8INmemTzcQUKfB7RQb2i?= =?us-ascii?Q?OAXWHJMXV4u+fnLzf406guNfeol77pQmHR8dm4aKMSwH5Zl4xl1EK9JK0zdF?= =?us-ascii?Q?uJGq0g/wz6W/YqzcABESYD0R37EgfapaVSQrjE5BMRcLlpKwYW9PAFbyuJbS?= =?us-ascii?Q?hwgj4YEfIcrkEx3DLdbo3Jtm/MfO1+r8HT1pH3QAAqL/3amfpSVqyzpi8cio?= =?us-ascii?Q?hxIkIxPfUBGwyLC5Ql2ufObzcQFR6X1P1IS1lueH1aY9IjyFzjms+hI7GOkV?= =?us-ascii?Q?3h8/AmPyBxZ3GYeF8Gblej+2KeFg9oomUlm09ZMzVQqgIH62qlA6VkC2FYLW?= =?us-ascii?Q?iw3faeKljs062M/+DVGcIL9B7dTgIWOL7uU15S+aFScXuen7sOf0DitJF4u1?= =?us-ascii?Q?EnP6wssO0h8zqkR4TL+RkqztiQWBxPwES/JuuHA4+s/gVUTtes35aeTpdtWg?= =?us-ascii?Q?9gfYLhYJZN37ZHI9kvfjlYISGpN5g4QDcrRdLC79kuCWvyD51MDerFhcbC+P?= =?us-ascii?Q?jnPtuK1YgHxGwJr+sU7EDAoIyYHdP69VNYOUyxFATpHdpWriCNmm5zfVOIIh?= =?us-ascii?Q?IqwOkehPyqFOthWXP5MKKmbUWaWc0wrIdBh0dqRPwr5BtLxbHpYkot0ciliw?= =?us-ascii?Q?VfZzjmvriEgENlJX9JKdJWtbpENQUOdFERABJUyE/UMy3T71UYloDWLha9HV?= =?us-ascii?Q?zQN5aS+PqAz8+NgjA7mqtO4PHz4O0XoWDVVjUZRFt15h4sugSj26/EVlYyoi?= =?us-ascii?Q?OjiMnDENfocNNXzogRQAReIVHsqtilz4XqwBAaAYQ9Jm1srl5PaF2lGV4+id?= =?us-ascii?Q?U8mCGEQ1EdobBLCXal7zt+rH+8smLtn27Ry9ZmqJ/93QnwjGjSlGDdPgtIg0?= =?us-ascii?Q?h/5Snq0MLJNmHCXZLPNFa2t/9nOku+APvMQtxvlwAODxXkQpGJFMdYAM6Y8b?= =?us-ascii?Q?0etYvYM4AxjT+DfVHU6AVFCUwo2a8mpqpuhF+DbgGnAn8AFQypNF51AH+4R/?= =?us-ascii?Q?6ununrrrCN32kg2s6hC4cqpOm7Qi+9HNcd3xWhYEbOOWH98CiOiCx6NnmSng?= =?us-ascii?Q?4Ji+3CVx9QbOF3qyEmQ3EXuO2wTBdPPA99AYD8h5rYiPg3zDwCAUp/tZoeQo?= =?us-ascii?Q?9JoIz1V/UdhkEL6XGpjs0oyevOEpfd04JXlX27ayMT+H4EcyjfzE5evTG6o6?= =?us-ascii?Q?tsOspOb+Yj6AaXkGalEIg10Eb/CjIq/65tBe3uWjZtrL5XRDde/ogJu+MYve?= =?us-ascii?Q?ft4nxqTmCFEjf8lLmX2/0Nj2GoPyKaKXGMmkGVCvpElGkay869DPC8tBrXxI?= =?us-ascii?Q?vYQn4IWxRoNFaSVCazyWA14x7bje4+XuJtociB2s+D/ktz//19VPFXpmgvBV?= =?us-ascii?Q?farbolDH4FKcAyiyome8KLjoaFQdpx7xrfblyvy9HPlgklkHiOZvCWghrgSs?= =?us-ascii?Q?dc68ZEOD4LSoTtNcexugWkDGMUcZtIew9/gltrjZ?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f615b17-8f7f-4d31-a5e0-08daa2776c3d X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2022 00:05:03.1196 (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: V2HQrvKFtHZc73gjIi2ZM5ymzlZajjszbpNMvjW/Hl6JyZiF/q4Kx2hseBeD9CEs9fwZNZ4RtxvPpGjCQ1SUUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB6397 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-29_13,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209290150 X-Proofpoint-GUID: tOkaKoHA7uKXt5bXo-TTx4N2aKxUU952 X-Proofpoint-ORIG-GUID: tOkaKoHA7uKXt5bXo-TTx4N2aKxUU952 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: Hello, This patch series was previously being reviewed in the set "[PATCH,V6 00/10] Definition and Implementation of CTF Frame format" here https://sourceware.org/pipermail/binutils/2022-August/122147.html (Posting links here of previous posting with old name "CTF Frame" for easy lookup: Initial (V1) posting contains necessary introductions: https://sourceware.org/pipermail/binutils/2022-May/120731.html V2 posting with some improvements: https://sourceware.org/pipermail/binutils/2022-May/120899.html V3 posting with further improvements: https://sourceware.org/pipermail/binutils/2022-June/121245.html V4 posting with further improvements and bugfixes: https://sourceware.org/pipermail/binutils/2022-June/121478.html V5 posting: https://sourceware.org/pipermail/binutils/2022-July/121839.html ) After the discussions at LPC and GNU Tools Cauldron this year, it seemed like the format needed a more suitable name. The previous name was justifiably bringing up some questions around: 1. How tied is the proposed frame format with CTF (Compact C-Type Format), and 2. Is the format applicable for only applications written in C. The answers to these questions are: 1. It is independent of the CTF debug format, and 2. No. So, we think the format needed a more appropriate name. The new chosen name is "Simple Frame format", or "SFrame" format for plain vanilla backtracing. This patch series has addressed the review comments sent earlier in August 2022 (and apologies for the long delay in sending this series): - include/sframe.h uses ansidecl.h and ATTRIBUTE_PACKED - gas patches have been split up. The gas testsuite is now a separate patch, hopefully it eases some pain around testing each patch as the gas testsuite needs the readelf/objdump support. The bfd/linker patch still has the testsuite combined in it though ... - bfd/elf-sframe.c now uses less BFD_ASSERTs. Some of them remain and I will deal with them over time. - fixes made for the compile-time warnings around incompatible pointer type [-Werror=incompatible-pointer-types] noted on i686 build. - other fixes around return type of some APIs, goofy labels and like. - added binutils/NEWS, gas/NEWS and updated the src-release.sh The format specification document still mains a TODO at this time. I plan to resume working on this after I have tackled the task of SFrame generation for PLT/veneers in aarch64. Another comment/feedback received at Cauldron was around the representation of the SFrame Frame Row Entries: Can SFrame FREs be made fixed length and hence, possibly compacted further such that all SFrame FREs across functions can then possibly share the SP/FP/RA offset records. This still remains to be experimented with. PS: libsframe/configure has been REMOVED from the patch series, as it causes the size of some patches to go beyond the allowed limit. Please regenerate libsframe/configure after applying the series. Testing notes: - Tested natively on x86_64-linux, aarch64-linux and i686-linux with '--enable-shared'. - Cross builds for various targets on x86_64 host with no explicit '--enable-shared'. Ran a regression script that checks for failures in gas, ld, binutils, libctf with no reported regressions. libsframe tests ran as expected. libsframebt (the backtracer) tests (which are present in libsframe/testsuite/libsframe.unwind) have been disabled with host != target. What is SFrame format and why do we need it ------------------------------------------- SFrame format is the Simple Frame format. It can be used to represent the minimal necessary information for backtracing. As such, it only encodes how to recover the CFA (based on SP/FP) and the return address (RA) for all instructions of a program. The format is supported on AMD64 and AARCH64 ABIs only. The information stored in the .sframe section is a subset of what .eh_frame can convey: .eh_frame can convey how to resurrect all callee-saved registers, if need be; but .sframe does not. SFrame format is intended for usecases where fast virtual stack unwind is needed, along with a need for a small simple unwinder. So, those applications which struggle with the following two complaints will want to consider SFrame format: - EH Frame based unwinders are complex and slow to manage with - EH Frame based unwinders are large as they need to deal with DWARF opcodes via a stack machine implementation More details about the format are available in include/sframe.h, please see commit "sframe.h: Add SFrame format definition". Our not-so-exhaustive experiments (basically binutils programs built with -Wa,--gsframe) show that SFrame/EH Frame section ratio to be an average of 0.8x for x86_64 and 0.7x for aarch64. Support in binutils ------------------- This patch series adds support for SFrame format in GNU as, ld, readelf and objdump. Two new libraries are being added: - libsframe - provides means to decode, encode/write, and probe SFrame sections. This is used by GNU ld and libsframebt. - libsframebt - small backtracer based on SFrame format. More details on each of these components are provided in the respective commit message. Thanks, Indu Bhagat (11): sframe.h: Add SFrame format definition gas: add new command line option --gsframe gas: generate .sframe from CFI directives gas: testsuite: add new tests for SFrame unwind info bfd: linker: merge .sframe sections readelf/objdump: support for SFrame section gdb: sim: buildsystem changes to accommodate libsframe libctf: add libsframe to LDFLAGS and LIBS src-release.sh: Add libsframe binutils/NEWS: add text for SFrame support gas/NEWS: add text about new command line option and SFrame support Weimin Pan (3): libsframe: add the SFrame library unwinder: generate backtrace using SFrame format unwinder: Add SFrame unwinder tests Makefile.def | 6 + Makefile.in | 1299 +++++++++++++- bfd/Makefile.am | 6 +- bfd/Makefile.in | 7 +- bfd/bfd-in2.h | 1 + bfd/configure | 2 +- bfd/configure.ac | 2 +- bfd/elf-bfd.h | 54 + bfd/elf-sframe.c | 533 ++++++ bfd/elf.c | 32 + bfd/elf64-x86-64.c | 97 +- bfd/elflink.c | 52 + bfd/elfxx-x86.c | 377 +++- bfd/elfxx-x86.h | 46 + bfd/section.c | 1 + binutils/Makefile.am | 10 +- binutils/Makefile.in | 9 +- binutils/NEWS | 2 + binutils/doc/binutils.texi | 4 + binutils/doc/sframe.options.texi | 10 + binutils/objdump.c | 76 + binutils/readelf.c | 47 + config/sframe.m4 | 16 + configure | 2 +- configure.ac | 2 +- gas/Makefile.am | 3 + gas/Makefile.in | 22 +- gas/NEWS | 3 + gas/as.c | 10 +- gas/as.h | 13 +- gas/config/tc-aarch64.c | 41 + gas/config/tc-aarch64.h | 29 + gas/config/tc-i386.c | 44 + gas/config/tc-i386.h | 26 + gas/config/tc-xtensa.c | 1 + gas/doc/as.texi | 19 +- gas/dw2gencfi.c | 30 + gas/dw2gencfi.h | 1 + gas/gen-sframe.c | 1300 ++++++++++++++ gas/gen-sframe.h | 141 ++ gas/sframe-opt.c | 158 ++ .../gas/cfi-sframe/cfi-sframe-aarch64-1.d | 20 + .../gas/cfi-sframe/cfi-sframe-aarch64-1.s | 61 + .../gas/cfi-sframe/cfi-sframe-common-1.d | 17 + .../gas/cfi-sframe/cfi-sframe-common-1.s | 3 + .../gas/cfi-sframe/cfi-sframe-common-2.d | 17 + .../gas/cfi-sframe/cfi-sframe-common-2.s | 2 + .../gas/cfi-sframe/cfi-sframe-common-3.d | 17 + .../gas/cfi-sframe/cfi-sframe-common-3.s | 4 + .../gas/cfi-sframe/cfi-sframe-common-4.d | 21 + .../gas/cfi-sframe/cfi-sframe-common-4.s | 8 + .../gas/cfi-sframe/cfi-sframe-common-5.d | 21 + .../gas/cfi-sframe/cfi-sframe-common-5.s | 7 + .../gas/cfi-sframe/cfi-sframe-common-6.d | 21 + .../gas/cfi-sframe/cfi-sframe-common-6.s | 7 + .../gas/cfi-sframe/cfi-sframe-common-7.d | 21 + .../gas/cfi-sframe/cfi-sframe-common-7.s | 7 + .../gas/cfi-sframe/cfi-sframe-common-8.d | 20 + .../gas/cfi-sframe/cfi-sframe-common-8.s | 12 + .../gas/cfi-sframe/cfi-sframe-x86_64-1.d | 22 + .../gas/cfi-sframe/cfi-sframe-x86_64-1.s | 30 + gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 58 + gas/testsuite/gas/cfi-sframe/common-empty-1.d | 14 + gas/testsuite/gas/cfi-sframe/common-empty-1.s | 5 + gas/testsuite/gas/cfi-sframe/common-empty-2.d | 14 + gas/testsuite/gas/cfi-sframe/common-empty-2.s | 8 + gas/testsuite/gas/cfi-sframe/common-empty-3.d | 14 + gas/testsuite/gas/cfi-sframe/common-empty-3.s | 9 + gas/testsuite/gas/cfi-sframe/common-empty-4.d | 14 + gas/testsuite/gas/cfi-sframe/common-empty-4.s | 17 + gas/write.c | 13 + gdb/Makefile.in | 8 +- gdb/acinclude.m4 | 4 +- gdb/configure | 35 +- gdb/configure.ac | 11 + include/elf/common.h | 1 + include/elf/internal.h | 1 + include/sframe-api.h | 214 +++ include/sframe-backtrace-api.h | 57 + include/sframe.h | 281 +++ ld/Makefile.am | 2 + ld/Makefile.in | 2 + ld/configure | 8 +- ld/configure.ac | 3 + ld/ld.texi | 4 +- ld/scripttempl/elf.sc | 2 + ld/testsuite/ld-aarch64/aarch64-elf.exp | 2 + ld/testsuite/ld-aarch64/sframe-bar.s | 7 + ld/testsuite/ld-aarch64/sframe-foo.s | 10 + ld/testsuite/ld-aarch64/sframe-simple-1.d | 26 + ld/testsuite/ld-bootstrap/bootstrap.exp | 8 +- ld/testsuite/ld-sframe/discard.d | 10 + ld/testsuite/ld-sframe/discard.ld | 9 + ld/testsuite/ld-sframe/discard.s | 13 + ld/testsuite/ld-sframe/sframe-empty.d | 10 + ld/testsuite/ld-sframe/sframe-empty.s | 2 + ld/testsuite/ld-sframe/sframe.exp | 47 + ld/testsuite/ld-x86-64/sframe-bar.s | 31 + ld/testsuite/ld-x86-64/sframe-foo.s | 37 + ld/testsuite/ld-x86-64/sframe-plt-1.d | 29 + ld/testsuite/ld-x86-64/sframe-simple-1.d | 35 + ld/testsuite/ld-x86-64/x86-64.exp | 2 + ld/testsuite/lib/ld-lib.exp | 45 + libctf/configure | 4 +- libctf/configure.ac | 4 +- libsframe/Makefile.am | 54 + libsframe/Makefile.in | 1100 ++++++++++++ libsframe/aclocal.m4 | 1242 +++++++++++++ libsframe/config.h.in | 144 ++ libsframe/configure.ac | 97 + libsframe/sframe-backtrace-err.c | 46 + libsframe/sframe-backtrace.c | 619 +++++++ libsframe/sframe-dump.c | 181 ++ libsframe/sframe-error.c | 49 + libsframe/sframe-impl.h | 55 + libsframe/sframe.c | 1584 +++++++++++++++++ libsframe/testsuite/Makefile.am | 23 + libsframe/testsuite/Makefile.in | 684 +++++++ libsframe/testsuite/config/default.exp | 57 + libsframe/testsuite/lib/sframe-lib.exp | 180 ++ libsframe/testsuite/libsframe.decode/DATA1 | Bin 0 -> 59 bytes libsframe/testsuite/libsframe.decode/DATA2 | Bin 0 -> 91 bytes .../testsuite/libsframe.decode/DATA_BIGE | Bin 0 -> 59 bytes .../testsuite/libsframe.decode/Makefile.am | 14 + .../testsuite/libsframe.decode/Makefile.in | 663 +++++++ .../libsframe.decode/bigendian_data.c | 107 ++ .../testsuite/libsframe.decode/decode.exp | 41 + .../testsuite/libsframe.decode/frecnt_1.c | 99 ++ .../testsuite/libsframe.decode/frecnt_2.c | 103 ++ .../testsuite/libsframe.encode/Makefile.am | 6 + .../testsuite/libsframe.encode/Makefile.in | 610 +++++++ .../testsuite/libsframe.encode/encode.exp | 25 + .../testsuite/libsframe.encode/encode_1.c | 182 ++ .../testsuite/libsframe.unwind/backtrace.c | 145 ++ .../testsuite/libsframe.unwind/backtrace.lk | 3 + .../testsuite/libsframe.unwind/inline-cmds.c | 136 ++ .../testsuite/libsframe.unwind/inline-cmds.lk | 3 + libsframe/testsuite/libsframe.unwind/inline.c | 97 + .../testsuite/libsframe.unwind/inline.lk | 3 + .../testsuite/libsframe.unwind/solib-lib1.c | 8 + .../testsuite/libsframe.unwind/solib-lib2.c | 51 + .../testsuite/libsframe.unwind/solib-main.c | 47 + .../testsuite/libsframe.unwind/solib-main.d | 3 + .../testsuite/libsframe.unwind/solib.exp | 75 + .../testsuite/libsframe.unwind/solib_lib1.h | 3 + .../testsuite/libsframe.unwind/solib_lib2.h | 3 + .../testsuite/libsframe.unwind/tailcall.c | 103 ++ .../testsuite/libsframe.unwind/tailcall.lk | 3 + libsframe/testsuite/libsframe.unwind/ttest.c | 127 ++ libsframe/testsuite/libsframe.unwind/ttest.lk | 3 + .../testsuite/libsframe.unwind/unwind.exp | 200 +++ sim/common/Make-common.in | 7 +- src-release.sh | 4 +- 153 files changed, 14927 insertions(+), 64 deletions(-) create mode 100644 bfd/elf-sframe.c create mode 100644 binutils/doc/sframe.options.texi create mode 100644 config/sframe.m4 create mode 100644 gas/gen-sframe.c create mode 100644 gas/gen-sframe.h create mode 100644 gas/sframe-opt.c create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-aarch64-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-2.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-3.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-4.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-5.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-6.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-7.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-common-8.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/cfi-sframe.exp create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-1.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-1.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-2.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-2.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-3.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-3.s create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.d create mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.s create mode 100644 include/sframe-api.h create mode 100644 include/sframe-backtrace-api.h create mode 100644 include/sframe.h create mode 100644 ld/testsuite/ld-aarch64/sframe-bar.s create mode 100644 ld/testsuite/ld-aarch64/sframe-foo.s create mode 100644 ld/testsuite/ld-aarch64/sframe-simple-1.d create mode 100644 ld/testsuite/ld-sframe/discard.d create mode 100644 ld/testsuite/ld-sframe/discard.ld create mode 100644 ld/testsuite/ld-sframe/discard.s create mode 100644 ld/testsuite/ld-sframe/sframe-empty.d create mode 100644 ld/testsuite/ld-sframe/sframe-empty.s create mode 100644 ld/testsuite/ld-sframe/sframe.exp create mode 100644 ld/testsuite/ld-x86-64/sframe-bar.s create mode 100644 ld/testsuite/ld-x86-64/sframe-foo.s create mode 100644 ld/testsuite/ld-x86-64/sframe-plt-1.d create mode 100644 ld/testsuite/ld-x86-64/sframe-simple-1.d create mode 100644 libsframe/Makefile.am create mode 100644 libsframe/Makefile.in create mode 100644 libsframe/aclocal.m4 create mode 100644 libsframe/config.h.in create mode 100644 libsframe/configure.ac create mode 100644 libsframe/sframe-backtrace-err.c create mode 100644 libsframe/sframe-backtrace.c create mode 100644 libsframe/sframe-dump.c create mode 100644 libsframe/sframe-error.c create mode 100644 libsframe/sframe-impl.h create mode 100644 libsframe/sframe.c create mode 100644 libsframe/testsuite/Makefile.am create mode 100644 libsframe/testsuite/Makefile.in create mode 100644 libsframe/testsuite/config/default.exp create mode 100644 libsframe/testsuite/lib/sframe-lib.exp create mode 100644 libsframe/testsuite/libsframe.decode/DATA1 create mode 100644 libsframe/testsuite/libsframe.decode/DATA2 create mode 100644 libsframe/testsuite/libsframe.decode/DATA_BIGE create mode 100644 libsframe/testsuite/libsframe.decode/Makefile.am create mode 100644 libsframe/testsuite/libsframe.decode/Makefile.in create mode 100644 libsframe/testsuite/libsframe.decode/bigendian_data.c create mode 100644 libsframe/testsuite/libsframe.decode/decode.exp create mode 100644 libsframe/testsuite/libsframe.decode/frecnt_1.c create mode 100644 libsframe/testsuite/libsframe.decode/frecnt_2.c create mode 100644 libsframe/testsuite/libsframe.encode/Makefile.am create mode 100644 libsframe/testsuite/libsframe.encode/Makefile.in create mode 100644 libsframe/testsuite/libsframe.encode/encode.exp create mode 100644 libsframe/testsuite/libsframe.encode/encode_1.c create mode 100644 libsframe/testsuite/libsframe.unwind/backtrace.c create mode 100644 libsframe/testsuite/libsframe.unwind/backtrace.lk create mode 100644 libsframe/testsuite/libsframe.unwind/inline-cmds.c create mode 100644 libsframe/testsuite/libsframe.unwind/inline-cmds.lk create mode 100644 libsframe/testsuite/libsframe.unwind/inline.c create mode 100644 libsframe/testsuite/libsframe.unwind/inline.lk create mode 100644 libsframe/testsuite/libsframe.unwind/solib-lib1.c create mode 100644 libsframe/testsuite/libsframe.unwind/solib-lib2.c create mode 100644 libsframe/testsuite/libsframe.unwind/solib-main.c create mode 100644 libsframe/testsuite/libsframe.unwind/solib-main.d create mode 100644 libsframe/testsuite/libsframe.unwind/solib.exp create mode 100644 libsframe/testsuite/libsframe.unwind/solib_lib1.h create mode 100644 libsframe/testsuite/libsframe.unwind/solib_lib2.h create mode 100644 libsframe/testsuite/libsframe.unwind/tailcall.c create mode 100644 libsframe/testsuite/libsframe.unwind/tailcall.lk create mode 100644 libsframe/testsuite/libsframe.unwind/ttest.c create mode 100644 libsframe/testsuite/libsframe.unwind/ttest.lk create mode 100644 libsframe/testsuite/libsframe.unwind/unwind.exp -- 2.37.2