From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 885B73858293 for ; Mon, 27 Jun 2022 23:47:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 885B73858293 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25RJVZ0e026411 for ; Mon, 27 Jun 2022 23:47:42 GMT Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gwsyscgw3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 27 Jun 2022 23:47:41 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25RNZQca007384 for ; Mon, 27 Jun 2022 23:47:41 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gwrt1cdnu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 27 Jun 2022 23:47:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KZEIUh1rupjgp7ng4NJiQOqkCn8zmExektHTXgjeo4RKjgbgmCQr7q8aGQH3ROZv0G2PV8ohoeKgkptdZYU74HsJeSv48T7dr0sFJ8Csefn9nV8YZfeMRQkZ0ieZB4+YP9oOHPqSBfixdc/5336UfnBPE+0b4FDgX0V4g6ufNKy3iOU57IoJYpPhYgDvSu/oIiuRTOiaPhF7+kZ2M3sc/sQb+m5kN6eFB5CmwIK33iFYjnJZ2xB7wnRTnS6ufSZHWkoD+tSokMZsNCIfsQcwukGjibMK9lIzhJSmMHvXHqsRUtggf91d3vg0ljjEUkt8K/3iA3ML1ENdORvfJzmbAw== 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=67r/9+DS4hDYDSz7oUGxEG73nyNT/Te6/HeXQVl6HBM=; b=MfLxus+Dwdf2oLEztDb4jX9FMue4X556bSFjm6VAEve2XI7aT8SS662BvAH9qYD/KnA3FAz9jVWKLFSFj0QmVAPKj8Q15AeOrclV0wuQJ+sd/at4FZlHGY+KK8tWZdM+7kSTcPPIpYFx/3vmjh33j0Aa8VlFHV9xTJ5knldAt2LoRnu0bDmYOzwT8X0f6JBx9jqjoFY7hlhYx1S0G1LkIun713HTHaLIWZdwL2KuKcDgx1Wq3/2Ii111QHlfxz1Ai9H00mefokwYe5eWLQG3XeWbowplBXNJdpWMw5kOQETLaySuIIm+M9XAYYCXjiUIp7DDzDqdYc7azEzo2xo8PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by BN0PR10MB4950.namprd10.prod.outlook.com (2603:10b6:408:12a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Mon, 27 Jun 2022 23:47:38 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::cc2a:4481:ace5:26ca]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::cc2a:4481:ace5:26ca%3]) with mapi id 15.20.5373.018; Mon, 27 Jun 2022 23:47:38 +0000 From: Indu Bhagat To: binutils@sourceware.org Subject: [PATCH,RFC,V4 0/8] Definition and Implementation of CTF Frame format Date: Mon, 27 Jun 2022 16:47:11 -0700 Message-Id: <20220627234719.718083-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.31.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MWHPR01CA0033.prod.exchangelabs.com (2603:10b6:300:101::19) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75436899-4db7-486d-d819-08da58976ae4 X-MS-TrafficTypeDiagnostic: BN0PR10MB4950:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qbxxxa69VvrnIZSu2Z4fjz16y3NtEJ3E60VYbqXf+gOhdl7a6irm8v+nXHGUNSlmmeY3lHv9Vl6RkI95AeQhS4ZemRiZvyGgRMjHGR9qF2S26QEjC2Ct8qUk6Q9GKMHUqNxVj/KXVrRkPAsRubiDjUJfHWvsOUur7+rSYpOlRrL+j4+Pg2UBlFRdJp+Zz5n5LLmOctVaC84ij60U96dMmxUc6UyQmB7EXMjSOVaK2W27S2Tp0FAQqf7yFVXpGVjtBCM/ukY2cwEkDDY1sJqgTm/HmsYZZFg+tl8J52niZvA+jVGcj/7ndDYxOBHICn6kwkpfOEIuHz10S2NyBMN3nCHRqwAIOC4L17UgxlLvarNNkKkQBo+R6lK0FCCrsw+xYNi4ZsmXtBk/DxVRxWL9AhejNAzuN9XnMn8fjWwOnTtf7ZrOd+5PhQfJYVLKA2wqxpHvtrxA6Xe6ZkcMdUjRPBDAQsDk54HvNK9V6YBqYLsUFd4hbKaU8JcAGogryczB8rbLgDKOkDxw3P9LeCy7ZynvH4OtH/EgsMTdEE8DR0/h1E3JIIpUhu7tFJJ8IutBKQHjLjv2tiQburMAaHnGXSiQN2hVcsysdtw/lknVnWtDLCklK07VHorUJOqKdfWxjb9LjC71GHSnXepOkp5Vxyv0rVpa4zr88CzkJ2GhLg/zsp4Pdz77rS1CnH4zzdCxsk61/74ynYpHhg+Nk2ClSEWHYRRdLYoRw+RTLIM6B9Rpm5jiC3kK+ReGIbUI8M1elLFLVQNRlr9Ez84VzK/tfjLa5D0CoPcfNTm+iUPwBnN1lTAJ8mQ3IHaI6zLOz9oQngheWUENKIVnmC8I9fCS0A8XxtffT7chmb32mO/kmss= 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:(13230016)(396003)(346002)(376002)(39860400002)(136003)(366004)(6486002)(6506007)(52116002)(83380400001)(86362001)(26005)(38350700002)(478600001)(2616005)(6666004)(44832011)(41300700001)(2906002)(30864003)(36756003)(966005)(316002)(66476007)(66556008)(186003)(5660300002)(1076003)(6512007)(6916009)(66946007)(8936002)(38100700002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?CXWKXYiTWWMu8zm8jpqHjLr8tdzu7A7vQTKzJj6mJPXe3rRdgmssO4PVUzZW?= =?us-ascii?Q?kCQoX3LjdLOmW7xpT6evN1rQZRxHSLnzL6XRPHaL84F+5p0xP6JdPiy2R6EO?= =?us-ascii?Q?dawIWDaaphPk4c+RiPj4vI4sZ9xD4g3igWarzKyw1kccqyKT5G1rY5nFd0gS?= =?us-ascii?Q?gYWPhpJE39FLLI283bIF3SYQ9f7HztGIAU8/DQgtm1cqD8GuakDCNYbOzKS7?= =?us-ascii?Q?GH1R46ONdEU5ugT4M8828M+cSuzIcFCdVQZCsoOIlAyJoB62CAP4EZYSxeaW?= =?us-ascii?Q?dUMqC9x9N/xLxAZG+HnMTJSZIk9lD0OoRG0U3Dnj4qTS77Va7d91m6PhU8/o?= =?us-ascii?Q?ellgaMFd0AqINwkCDZbJ3OECmmKfdCPg4DShTY4JjJOoXJdVdz76Vy3pflU5?= =?us-ascii?Q?lk/KdKGs4vS/Airg4akaWsohViYdXigyK9UWIMPNLpLh0/m22JvAqrQknHB2?= =?us-ascii?Q?JWMmqSXcg/H3eVNEnEk6DXHx/7FVfFp1Kds55RGcV2i+HLipvRidskx+sxJ1?= =?us-ascii?Q?y0I11kMCfRfV3ODLeZvIxpZYqua/Ls3OeuUcAxmbMeDQ20acw/mmxbZkjOvU?= =?us-ascii?Q?3Ke5mU7TAB2kCiboOeYNy9p2ozyXfAWtSP1lGUJA3uGULsRrZS/O2uq8jheV?= =?us-ascii?Q?iC8pAGcpmoLCLD2hKrldfUe+yiiLbD9lPfmrosW33YIZ7/jlkZjJ0dD5xjV/?= =?us-ascii?Q?zm4mfJtEqNackgRJ46/Alt2EzqniunkAEGx2sGpFwAFZQk1E5so43zrJJQTY?= =?us-ascii?Q?dl+CZuOQwX8GzwjtPJHeBFQhsFE8xsBtefTFAnvnV9qs6eVG+jPiTijvEZQb?= =?us-ascii?Q?j++n3MJUEZD6Uv7sRDxsZ2K6ewzLwLNRvJH+x0fVFZmc1SiVcp5HiIyMbJEk?= =?us-ascii?Q?d0nd8kthv8RqJBhrJ84jglTfg5YslxbTy8LW6qo5+xpmRvWz5PqgwrB/bF7L?= =?us-ascii?Q?UFBsTpqqx0vjjD0W61rVnz3NbF1wx9RHuVo4YiiEf1Jg/nsF3MM33V11Vdtr?= =?us-ascii?Q?oFwCCznpeX/2sQdN4txUUCc8E+ge0wStnSYqM85iWQPCDEhdZtEKy+rrK9ZA?= =?us-ascii?Q?q62LB1QHFa67WB9X34SLiDYKpVsauQ1Ja+DULkraMb0JQyDva4/VKU1nn+/+?= =?us-ascii?Q?CoBhcpxPGQPqnYUG1ui2qvSeVI+WBTF2NZPE4f9x5bR59SRFQWtWwoa6HVDW?= =?us-ascii?Q?CuP1qqC24L1wgzEVHiOA1YWGFHHKp3hw7iHA/W7lW5nlpw6IYf7WKoinEhf5?= =?us-ascii?Q?L6XkkYC/U3bAYUmchruNKCY5+agI8XRiaLww/H/20FfSXbi3qpzLKvuXTHp/?= =?us-ascii?Q?jnwhJFGpUz4+t7Ecxe9hJR3JOctOxDR61PaxanYRXCRMJSJoC/TCOr0c3P1E?= =?us-ascii?Q?IH1EGWcwElccSV7YY7B73yXG+aPaqDw2taPRTJ0R3C0KQ3oV7dzMNp/NnqTy?= =?us-ascii?Q?v8ENL8vUGvx31r8iJg15DtWt9oNZp5sHvnU6K5ll7z35yX/ymPa1F6tRcq+q?= =?us-ascii?Q?842Dz7tzPvVnJzgzGYGWQJjuMiG9FmCAWAiIcCp9gqPd4KOFwV6j12uTt60K?= =?us-ascii?Q?2kTPgddpUFY9FX2cYNjfl5mv7fv/YNlJzHtYnAKI?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75436899-4db7-486d-d819-08da58976ae4 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2022 23:47:38.4753 (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: t9crdTDXww5kxWog/yId9A1NuwMSEvx5m2qZAkhYeW8zU6/esEp2Uib0Qss4q5ir7Phpv1+fSOBGsgpsyeekDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB4950 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-06-27_06:2022-06-24, 2022-06-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206270096 X-Proofpoint-ORIG-GUID: wdlx5VJ98yA6H38NL91lddx7cVsp7aI4 X-Proofpoint-GUID: wdlx5VJ98yA6H38NL91lddx7cVsp7aI4 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HEXHASH_WORD, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2022 23:47:47 -0000 Hi, This is version 4 of the previously sent RFC series. 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 The commit log of each patch in the current patch series specifies the changes from the version V3 of the respective patch. Briefly, following are the main changes in the current version V4 as compared to V3: 1. CTF Frame format can now compactly represent unwind information for regular, repetitive instruction patterns like the plt entries. This has helped make the size of .ctf_frame more attractive. [As .ctf_frame encodes a subset of information in .eh_frame, the sizes of .eh_frame will be justifiably higher.] ratio = (.ctf_frame size) / (.eh_frame size + .eh_frame_hdr size) Program | ratio ---------------- addr2line | .76 as | .81 elfedit | .76 gdb | .78 gdbserver | .78 gprof | .80 ld | .81 nm | .78 objdump | .81 readelf | .82 strings | .76 ar | .78 c++filt | .75 gprofng | .59 ld.bfd | .81 objcopy | .81 ranlib | .78 size | .76 strip | .81 In summary, earlier the CTF Frame unwind information for plt entires looked like follows (in V3). $ readelf --ctf-frame=.ctf_frame testbinary ... func idx [0]: pc = 0x401020, size = 64 bytes STARTPC CFA FP RA 0000000000401020 sp+16 u u 0000000000401026 sp+24 u u 0000000000401030 sp+8 u u 000000000040103b sp+16 u u 0000000000401040 sp+8 u u 000000000040104b sp+16 u u 0000000000401050 sp+8 u u 000000000040105b sp+16 u u Now with the V4 version of the patch series: func idx [0]: pc = 0x401020, size = 16 bytes STARTPC CFA FP RA 0000000000401020 sp+16 u u 0000000000401026 sp+24 u u func idx [1]: pc = 0x401030, size = 48 bytes STARTPC[m] CFA FP RA 0000000000000000 sp+8 u u 000000000000000b sp+16 u u 2. More testcases in libctfframe, further improvements and bugfixes. This is a work in progress. In the subsequent iterations of the series, I plan to focus on further testing CTF Frame unwind information for correctness and completeness. We currently have a suite of unwinder tests which are used to validate the CTF Frame unwind information in various scenarios on x86_64 and aarch64 by unwinding through a variety of call stacks. We will now work on increasing the coverage of those tests and incorporating the testsuite (perhaps with libctfbacktrace) in the next patch series. That said, CTF Frame support V4 patch series has been regression tested on a host of targets with no regressions. Important note: libctfframe/configure has NOT been included in the patch series, as it causes the size of some patches to go beyond the allowed limit. Please regenerate the libctfframe/configure after applying the series. Please comment and provide feedback, it will help shape the format. At this time, I really need some inputs on: 1. What is a good place for an unwinder based on CTF Frame format ? Currently to facilitate discussion, it is presented in a library of its own: libctfbacktrace which, in turn, uses the libctfframe library for decoding the .ctf_frame section for unwinding. We brainstormed a bit about the possible candidates being libbacktace, libgcc or libunwind ? Are there any recommendations ? Thanks, Indu Bhagat (6): ctf-frame.h: Add CTF Frame format definition gas: add new command line option --gctf-frame gas: generate .ctf_frame bfd: linker: merge .ctf_frame sections readelf/objdump: support for CTF Frame section gdb: sim: buildsystem changes to accommodate libctfframe Weimin Pan (2): libctfframe: add the CTF Frame library unwinder: generate backtrace using CTF Frame format Makefile.def | 5 + Makefile.in | 1289 +++++++++++++- bfd/Makefile.am | 6 +- bfd/Makefile.in | 7 +- bfd/bfd-in2.h | 1 + bfd/configure | 2 +- bfd/configure.ac | 2 +- bfd/elf-bfd.h | 55 + bfd/elf-ctf-frame.c | 529 ++++++ bfd/elf.c | 32 + bfd/elf64-x86-64.c | 97 +- bfd/elflink.c | 52 + bfd/elfxx-x86.c | 379 +++- bfd/elfxx-x86.h | 46 + bfd/section.c | 1 + binutils/Makefile.am | 10 +- binutils/Makefile.in | 10 +- binutils/doc/binutils.texi | 4 + binutils/doc/ctfframe.options.texi | 10 + binutils/objdump.c | 76 + binutils/readelf.c | 47 + config/ctf-frame.m4 | 16 + configure | 2 +- configure.ac | 2 +- gas/Makefile.am | 3 + gas/Makefile.in | 23 +- gas/as.c | 10 +- gas/as.h | 13 +- gas/config/tc-aarch64.c | 42 + gas/config/tc-aarch64.h | 29 + gas/config/tc-i386.c | 46 + gas/config/tc-i386.h | 26 + gas/config/tc-xtensa.c | 1 + gas/ctf-frame-opt.c | 158 ++ gas/doc/as.texi | 19 +- gas/dw2gencfi.c | 30 + gas/dw2gencfi.h | 1 + gas/gen-ctf-frame.c | 1242 +++++++++++++ gas/gen-ctf-frame.h | 142 ++ gas/testsuite/gas/cfi-ctf/cfi-ctf-aarch64-1.d | 20 + gas/testsuite/gas/cfi-ctf/cfi-ctf-aarch64-1.s | 61 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-1.d | 17 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-1.s | 3 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-2.d | 17 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-2.s | 2 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-3.d | 17 + gas/testsuite/gas/cfi-ctf/cfi-ctf-common-3.s | 4 + gas/testsuite/gas/cfi-ctf/cfi-ctf-x86_64-1.d | 22 + gas/testsuite/gas/cfi-ctf/cfi-ctf-x86_64-1.s | 30 + gas/testsuite/gas/cfi-ctf/cfi-ctf.exp | 48 + gas/write.c | 13 + gdb/Makefile.in | 8 +- gdb/acinclude.m4 | 4 +- gdb/configure | 35 +- gdb/configure.ac | 11 + include/ctf-backtrace-api.h | 57 + include/ctf-frame-api.h | 213 +++ include/ctf-frame.h | 281 +++ include/elf/common.h | 1 + include/elf/internal.h | 1 + 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/ctf-frame-bar.s | 7 + ld/testsuite/ld-aarch64/ctf-frame-foo.s | 10 + ld/testsuite/ld-aarch64/ctf-frame-simple-1.d | 26 + ld/testsuite/ld-bootstrap/bootstrap.exp | 8 +- ld/testsuite/ld-ctf-frame/ctf-frame-empty.d | 10 + ld/testsuite/ld-ctf-frame/ctf-frame-empty.s | 2 + ld/testsuite/ld-ctf-frame/ctf-frame.exp | 47 + ld/testsuite/ld-ctf-frame/discard.d | 10 + ld/testsuite/ld-ctf-frame/discard.ld | 9 + ld/testsuite/ld-ctf-frame/discard.s | 13 + ld/testsuite/ld-x86-64/ctf-frame-bar.s | 31 + ld/testsuite/ld-x86-64/ctf-frame-foo.s | 37 + ld/testsuite/ld-x86-64/ctf-frame-plt-1.d | 29 + ld/testsuite/ld-x86-64/ctf-frame-simple-1.d | 35 + ld/testsuite/ld-x86-64/x86-64.exp | 2 + ld/testsuite/lib/ld-lib.exp | 45 + libctfframe/Makefile.am | 84 + libctfframe/Makefile.in | 1050 +++++++++++ libctfframe/aclocal.m4 | 1242 +++++++++++++ libctfframe/config.h.in | 144 ++ libctfframe/configure.ac | 82 + libctfframe/ctf-backtrace-err.c | 46 + libctfframe/ctf-backtrace.c | 617 +++++++ libctfframe/ctf-frame-dump.c | 181 ++ libctfframe/ctf-frame-error.c | 49 + libctfframe/ctf-frame-impl.h | 55 + libctfframe/ctf-frame.c | 1584 +++++++++++++++++ libctfframe/testsuite/config/default.exp | 60 + libctfframe/testsuite/lib/ctfframe-lib.exp | 206 +++ .../testsuite/libctfframe.decode/DATA1 | Bin 0 -> 59 bytes .../testsuite/libctfframe.decode/DATA2 | Bin 0 -> 91 bytes .../testsuite/libctfframe.decode/DATA_BIGE | Bin 0 -> 59 bytes .../libctfframe.decode/bigendian_data.c | 110 ++ .../libctfframe.decode/bigendian_data.lk | 3 + .../testsuite/libctfframe.decode/decode.exp | 38 + .../testsuite/libctfframe.decode/frecnt_1.c | 108 ++ .../testsuite/libctfframe.decode/frecnt_1.lk | 3 + .../testsuite/libctfframe.decode/frecnt_2.c | 113 ++ .../testsuite/libctfframe.decode/frecnt_2.lk | 3 + .../testsuite/libctfframe.encode/encode.exp | 38 + .../testsuite/libctfframe.encode/encode_1.c | 173 ++ .../testsuite/libctfframe.encode/encode_1.lk | 3 + libctfframe/ttest.c | 78 + sim/common/Make-common.in | 7 +- 111 files changed, 11693 insertions(+), 58 deletions(-) create mode 100644 bfd/elf-ctf-frame.c create mode 100644 binutils/doc/ctfframe.options.texi create mode 100644 config/ctf-frame.m4 create mode 100644 gas/ctf-frame-opt.c create mode 100644 gas/gen-ctf-frame.c create mode 100644 gas/gen-ctf-frame.h create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-aarch64-1.d create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-aarch64-1.s create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-1.d create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-1.s create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-2.d create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-2.s create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-3.d create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-common-3.s create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-x86_64-1.d create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf-x86_64-1.s create mode 100644 gas/testsuite/gas/cfi-ctf/cfi-ctf.exp create mode 100644 include/ctf-backtrace-api.h create mode 100644 include/ctf-frame-api.h create mode 100644 include/ctf-frame.h create mode 100644 ld/testsuite/ld-aarch64/ctf-frame-bar.s create mode 100644 ld/testsuite/ld-aarch64/ctf-frame-foo.s create mode 100644 ld/testsuite/ld-aarch64/ctf-frame-simple-1.d create mode 100644 ld/testsuite/ld-ctf-frame/ctf-frame-empty.d create mode 100644 ld/testsuite/ld-ctf-frame/ctf-frame-empty.s create mode 100644 ld/testsuite/ld-ctf-frame/ctf-frame.exp create mode 100644 ld/testsuite/ld-ctf-frame/discard.d create mode 100644 ld/testsuite/ld-ctf-frame/discard.ld create mode 100644 ld/testsuite/ld-ctf-frame/discard.s create mode 100644 ld/testsuite/ld-x86-64/ctf-frame-bar.s create mode 100644 ld/testsuite/ld-x86-64/ctf-frame-foo.s create mode 100644 ld/testsuite/ld-x86-64/ctf-frame-plt-1.d create mode 100644 ld/testsuite/ld-x86-64/ctf-frame-simple-1.d create mode 100644 libctfframe/Makefile.am create mode 100644 libctfframe/Makefile.in create mode 100644 libctfframe/aclocal.m4 create mode 100644 libctfframe/config.h.in create mode 100644 libctfframe/configure.ac create mode 100644 libctfframe/ctf-backtrace-err.c create mode 100644 libctfframe/ctf-backtrace.c create mode 100644 libctfframe/ctf-frame-dump.c create mode 100644 libctfframe/ctf-frame-error.c create mode 100644 libctfframe/ctf-frame-impl.h create mode 100644 libctfframe/ctf-frame.c create mode 100644 libctfframe/testsuite/config/default.exp create mode 100644 libctfframe/testsuite/lib/ctfframe-lib.exp create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA1 create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA2 create mode 100644 libctfframe/testsuite/libctfframe.decode/DATA_BIGE create mode 100644 libctfframe/testsuite/libctfframe.decode/bigendian_data.c create mode 100644 libctfframe/testsuite/libctfframe.decode/bigendian_data.lk create mode 100644 libctfframe/testsuite/libctfframe.decode/decode.exp create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_1.c create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_1.lk create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_2.c create mode 100644 libctfframe/testsuite/libctfframe.decode/frecnt_2.lk create mode 100644 libctfframe/testsuite/libctfframe.encode/encode.exp create mode 100644 libctfframe/testsuite/libctfframe.encode/encode_1.c create mode 100644 libctfframe/testsuite/libctfframe.encode/encode_1.lk create mode 100644 libctfframe/ttest.c -- 2.31.1