Message ID | 20240417202018.34966-1-nick.alcock@oracle.com |
---|---|
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> 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 EED143847700 for <patchwork@sourceware.org>; Wed, 17 Apr 2024 20:21:20 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 53017384AB56 for <binutils@sourceware.org>; Wed, 17 Apr 2024 20:20:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 53017384AB56 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 53017384AB56 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713385242; cv=pass; b=jQhkdmwahczujeb2Xiz2N+r1Zai3KM05W8NlnCbceLaBaNz+hN8sm8kNRY5RNgXdXLZxjWvF5StaXK/1fkNJvwQuveZxxZjeDtxBN0N520GhVTTi+R2MA30bC/nmVDogq2TjWg5iwH8Sy27gEj9BHFGiFK2yi6a74MbD1wGEmcs= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713385242; c=relaxed/simple; bh=L9EmBerCcS5BzGa22ajiCs1CV6j3hPSjX9kfCdQzEy8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=II1LlciJfUqQe7jcEBrqA7TtuoAQunM9Ewkkwynx6wkCiC+J/PiKEHdxS3vu92oZy9w26LTm1FjvJDmoV7Ju12sDlyjYLWI9khkYEcN/vPrX4H3ChEHuqN09iBD+GjCm5YaYVoA4HW37cz/KIZ2Q1Kx+s+jH6TQUq+B5l2sA8fI= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43HHhq78007997; Wed, 17 Apr 2024 20:20:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=zhfycTEKv5vMydQBPm1HNMxH48XfgQU5TxhClvjuLcA=; b=JSW43LRnx3X4Pm6uPkEoNjaoXSU92pdRzpVjjUDf0lnHvsrFGsuKZxukAmITvYQnpL9d SCY2/6oEVZK8i66mQCeVB8xtKBoY+lKaid39qQOmQb2x8RzzovgTveflga7nvQ9N8cUT W/dN0sKMLHq7L5zOlUCIcO9HIWJnCDt3zPruq6XjKh+v4wB09geqiQZIdfdK0GI1FHdS kb66dNjG4tQhFYlP6qPx0uDdB0Wr8pOs6HbcOENozzhuLumB3+8MOu7HqrI1X9lvjMyY LZFwAE2CfA2GH6/WFtZhldeg4u3DJBhJUDYDsYNnMZiHKDVJGeCtZXXENQKr80K00meC 9g== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xfgujryxr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Apr 2024 20:20:38 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43HJUbGv029294; Wed, 17 Apr 2024 20:20:37 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xfgg9cq70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Apr 2024 20:20:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YLBWlWoL3uw5XreKArEcBpkAAmveHGycsTe/7qnRWK5MDbBoL3N3vEGSgQwhq9H/jw13QC1oZ6NZu1gJFqaP6wSaHfiT+J8EM483a/kDs9cpekhy2SMxYLYmYUSS/O+mBFICTgFBdzz4DCZHJxOUPlAK2uDVR0dVH2j3Wsp7MvdDhpTXByzdWrE0u2h0DTV7Umy2HyxiGtmtEFJY2+F93sm2jJnHjN2p+YhDcmHn74iv1qVfmVnNt82xio2V/aVoV17vMzh8Z14gAvvbWOJAurPNymnO441+Jq5fmZSiwUZ5MZN+WlUSovFPPDdKb5Mqvonum4eP+JuxYKiEbqyyYA== 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=zhfycTEKv5vMydQBPm1HNMxH48XfgQU5TxhClvjuLcA=; b=PxA7eUpy2XRQRNi8tZpedksrn8Vs/xxiytmzQblvZWPU7xDNH65pyOYuQEdRtVmiJ3pCz55zejzrdZ9XwfPp6LcmuBxXPSxz3LxXzd2yAPpqhuuYnVL4dt2AqUE1VTGwCl7+aQrHGBhVlraDt++S0qpudUzC6UFiCkZ5adc6MMy8j8tWaeYTDIHszIukg05X2rdrtjyhtJsVJ94jIRAH3+is8hjwHIL+YJcWJ3O+G97HL9grXW6KaSqF+fkj7W+jke5TeR4LboOKERNUDz0oWxZ2U/HfI6nCr62xA288hkMBo/TefCCwk1p1PeAmx42ZOVqdguN5Z8SYGFuU6fQQoQ== 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=zhfycTEKv5vMydQBPm1HNMxH48XfgQU5TxhClvjuLcA=; b=lzhafpxjVltJ/5fST4s887DClCrSf1/Amh9kSEXgLQr1RF2t/c8Qd3QVYpJWkIQDNwwDlDcGtIlqYKTs0KuzRVpuhlXm5DckZ3E4mEYLAzvf3l5kBOrhSlJUompX36gULqvUuzVFeSkiArKRNQ1JmwlARAQ2vcRSO+vSrblWsXg= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by SA1PR10MB6640.namprd10.prod.outlook.com (2603:10b6:806:2b6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Wed, 17 Apr 2024 20:20:33 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751%7]) with mapi id 15.20.7472.037; Wed, 17 Apr 2024 20:20:32 +0000 From: Nick Alcock <nick.alcock@oracle.com> To: binutils@sourceware.org Cc: Nicholas Vinson <nvinson234@gmail.com> Subject: [PATCH libctf 00/22] more modifiable CTF dicts (and a few bugfixes) Date: Wed, 17 Apr 2024 21:19:56 +0100 Message-ID: <20240417202018.34966-1-nick.alcock@oracle.com> X-Mailer: git-send-email 2.44.0.273.ge0bd14271f Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0504.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13b::11) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|SA1PR10MB6640:EE_ X-MS-Office365-Filtering-Correlation-Id: 669f2eb1-5802-4d8d-6eb6-08dc5f1bd509 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9tvx22L+nEp8XNvh8mTjlcgGn4UE9bxQ8O2itB0/II7XDmg/LlZdU6mvvPmaIDcJuGHOpJEFf4cj+CEKTkVd1gNfw9WI500mpzlUMFYLquYzZCQ26KbXYaQYZ5U3X+WWM1RTJ0YqHhteeMQlxioA4OeJ4Y/3IdREmeaMAQY90cLXKDcFzES4lekcusiDkwzmTTrLDmBOlmHxxXjgwns0kvUyBIXmxhlAHXKLHtr2yA4gBvrDiUuWIiiT+PZgP/QCDxAetiS9owVV/Is4TdA/MyhaqLW6/emiuvk8W/ed2vdKllbPgsjauQ/tK316yr+0g9f2uACbDDH8MTiEek61HURr+Spn2ssiDn2hEzxqWrAL0TY/yVoJPw0Yg79jWO/KaEgIdF8VZm75+Y/LPk1fXrxbWEw6u/F3T/FVxthJeaaTkEaQqcGB5pXxe9eWs4lbVcFqdvtBy9F7ECW/TEqQf/YAt6HsPI/il805t+HYa06fdKcl2PHRkWX8Er60IPsj8J1OJdRwNUk2XAVZMUYN7Ztt0cfgUsLvYRVLI7LoZOoIbl549dfZpmqEgKC/LV85SJzSbJdhkFdOM9JBiHdoUQZAYJte6/YEUBUaROahkkg9xyJ0Ycztcg8jJtXXel0JsAZTe3iU9AJM4jCX4D59JOOBYWsOWp+J9jBP989k730= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR10MB6608.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 812ePCJCCg5HBStqNuix1/MhhWJFiH2V+Gu8QqwKUxEeII7SpysmvALkI0btV2EGiGD9/3eVpWld9Mxxobtr5KM2ZIjnDJiwtUCQ+T7pyUzIxC72lYYVaRaJUHA4EvLl7nEmkv63LHlMwHing08/H98YNhW9TKbhYm8T2VdMjSPheFXG4erT7aaPJQB0EvOaoAyr3kSFRM/xrudGI0UdLghCVhnYyCkp6Ls0u3hp9wHuFWMHMny6wCLkj4TBv5C5hvtROr2LT1eVRmvgR++ZwTIbI1M6hViS2bhcHWsE9/ujrr5kIqxZVQ497ldo511UjiambLh6JNVU6RXkSDekt3sjrG4j2z0jdYhWhwNhaVknnfKNJtwn4ksCuxriP63dqSUkRaWWWrQtVUff1m6F0sJyA/YFNkPvxab3Nvs5no800l6J51We3pThp+P/GX/A7iR6ksEkCnuWWFqSDRhMCZrl3LHySa1TYSnkIQHTuEYt3rt7nQBN47gLWGaiYjsJKYGEW81+VEGsan+QO6c5/9muF2LUbb6Bm9w5qvcvOSCcJBKsreRoagYMOW6wxiC9qljltZEKnW7i/U9LWFqxav+dWZhh9xhY/jicrjz9gt7ZJhGXmCeN4om1+a4qhMyeIxRAFWhca27mrkEKMMfGxopqPUdDcrEegv98eFQs8l9++B7UMpSBzvcFRVd5n+nS+Y16mTWVr3IDbaXEPIf5sY2hxDaaC1ftRucH4nGLFtswrdP7i7FTbCsJZkFYT6RANa/S55Plo5jKppR44QAEwUycHul6ALWRtrXsKvqVxJRq7tDuRJlsIgBZ9BG65UbNvuLTlPK42959VgN4w87EQO7Wog/47C5GLWIQRwgPXlp4YVz6fORLC+B1DljuvxxC8MFZ2//NlX/+gVmaArw0Njx0lUVDfm6ZJbw5qmAf5M1NJL2T6L5yNLDK+04YEiXuKqFHYftt+nvjUQdNd76QXCwv2Eq8CXRcYxTVuff/jxMnDAzv3ZSYAxYAeFGZFIwwuDrB4HJf9+A08Ka8avm5poTVvdDTmFWr4pCA3xa/qPE2IXs/CfPdfDILEkEHgksmAL1dmikrEMU6FWurYNKfdwRUeamdJy/7BQJSu/2eHUb7NPWH1ngAAtgbgtTw5LGS40ochhh8qxCb6zaQrlamzWSjSOZ1Wwin8lLHoEZx8hQMmepNvFqMQp34gYMvB8SoJfOxD9EqRAdsfaaid5F4uagFC7hmC27tW75n82gcN6LaZEZ+rUfxsolg0IflBA9NOBs7WVothmAJb3BsKHUIjwSRu04thfLbApfaTbXzFceBE2ALjgahF90K5XwWcF7Db+f4cGiYX4IEXVNs5Hv+d/szS/pI/FUagWFavFS+M8p16K8UjsxyI2VBS3LhVsin0qUY7zf99xAzrNfwzKrfH+AXYcOPFv2k4KqjPRe1zXM2Z05PAzpf6DLD0iWZVdQZ84iFs12XldV3QFnNOYpb8lyGtnyfYp0ThExdIIsSZ2kR6ndeZphSev4R1DTlYIMjieA78FjHzWY+XWGVleblvckkvGCRrEuM8LAh5QiKK+bqf8IngaePhwVqfqqG5hJTOkUnO7V9P0/dJSb919wTFg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 2pyDAiNATFTCzEIFrjtr23Cv5TV2ffO9Yte70Lr9enE5nokjUbUG7xLMJUq54Uonw2AYJLB73NtbKn0JXLPIYUJMBIKcXTvjcz6rWenWg7CB6aqTvD1SKRUoBFZ2kVGMoktEdP1aLLgog3WF5FIu5zX0Q0iiTmuZXwhjkuE18pKGa6fNKlNKpyGjK1I3NXXGzJ6pvpLr9Hp8aIn7xnNWaf9NH1KTQY89wxWGKsokFEsgcp3QzMTLqLGKPS8hZI5EMucTblFMqC54WBMWs64Diyq1aqe17XztA0wmdIB+sN4x4/lEMAsGs8/GitdB8eCtag4ihA0pfpu6Bqs78rfm/QHCMx48C8K/2jiBSAefD9Y1+7jbbyfaZEgambdV5SuLzRNGZtmI3L5gbQqxjYRRHSc7OD/Ie+p18z3h32C6ihUnoUIAeSYbEiNCvaQ00MHTCJnlG7OSmvGdDQXF5oQsoPutbROkeVvmhWCthGHAmbPIk+yDnZRHGb4UWojIgM0G7sLZHkAIKDXqwThYImNC92oqtj4PgRkI42KggEIGieDdtyhAcO7C5iRjGuR0fv/GTNmTTNDkU29JB0yHZzh3J2H9sAAKEg6kR4/YFyN7LoI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 669f2eb1-5802-4d8d-6eb6-08dc5f1bd509 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2024 20:20:32.4993 (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: P9nDuSW+u6EWSprWA8nRnuC0Yqx5FDxIAJF5ypDXlFjRbGDbk59U586y8GrRD9fZaKcBlk2d0jwMmaT8KsT8dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6640 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_17,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 mlxlogscore=920 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404170143 X-Proofpoint-ORIG-GUID: cG18k5jT1VctqCy6l0Td-LELRu9GLpF1 X-Proofpoint-GUID: cG18k5jT1VctqCy6l0Td-LELRu9GLpF1 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
more modifiable CTF dicts (and a few bugfixes)
|
|
Message
Nick Alcock
April 17, 2024, 8:19 p.m. UTC
A longstanding restriction of libctf is that open CTF dicts are divided into two varieties: one that you can create, add stuff to and then write out and throw away, and one that you can open but then never add anything to: the dict is forever read-only. This distinction is not entirely original sin. Solaris libctf and its users had remnants of code that suggested that it was intended to be possible to read in CTF and at least modify it, but this was never properly implemented and would at best have caused memory corruption. Most attempts failed with an ECTF_RDONLY error. This was not at all helped by the design decision to split the set of types libctf saw into 'dynamic' (added by ctf_add_*) and 'static', have lookups work only on static types, and have ctf_update() work by throwing the dict's static types away and reserializing them from the dynamic types. This stopped type lookup working until you did a ctf_update() to reserialize the entire dict, at increasingly horrible performance cost, and meant that libctf had to in effect handle dicts that were mixtures of read-only and writable dicts while gaining none of the benefits of doing that. The performance cost and need to call ctf_update() have long been fixed, and lookups now work on all types however added, but the restriction that writable dicts came from ctf_create() and read-only ones came from ctf_*open(), and that you couldn't save the latter, persisted. Worse yet, if you tried to save writable dicts more than once things often went wrong (strtab corruption was commonplace), even if you did nothing at all to them between the saves. This series tries to clean all that up, in part so we can save dicts and make transformations to what we save without affecting the dict itself, and certainly without corrupting anything. Ignoring a few commits that introduce a minor new option to objdump, fix an unfortunate error in lookups of bitfield types by name, and fix typos and leaks, this series is divided into two halves: - patches up to the reversion in the middle, which make the readonliness of dicts apply to *types* instead of the dict as a whole: in particular, you cannot add members to structs, enums, or unions that were read in from files. You can add references to them, and add new types of any kind freely, which was more or less easy except for the symbol handling code, which needed a good bit of rejigging (and bugfixing) in the process. - the reversion and patches beyond it discards an old internal strtab abstraction which proved to be much more trouble than it was worth ("pending refs") and replaces it with a new scheme which fixes corruption of the string table if serialized more than once, drops any need to scan existing types for references to strings (so we can just blindly copy the existing static type table from a ctf_open()ed dict and append to it when saving it again), and redoes serialization and the writeout functions so that while it does make a few changes to the dict being read in (the strtab is regenerated), the types table is not affected, and there is no "replace the guts of this type table with a serialized copy" nonsense like libctf has always had before now: we just emit everything into a new buffer and return it. Old types already present when the dict was ctf_opened need not be traversed at all (we have to traverse the symtypetabs and variables sections because they are sorted, so any new entries probably appear in the middle). The result is noticeably simpler and avoids a lot of boilerplate where you had to remember to copy every field in the struct ctf_dict (and remember to augment this list when adding new fields, which was routinely forgotten, triggering different subtle bugs every time). It also fixes a couple of completely broken API functions, notably ctf_gzwrite(), which while inconvenient and annoying to use should not completely fail to serialize the dict before writing it out... The last couple of patches, one due to Nicholas Vinson and the other very similar to one he wrote, fixes bugs that break building with recent LLD (LLD is stricter than GNU ld with respect to version scripts these days). The usual giant pile of tests have been run: all look happy. I'm going to run the trybot over it shortly. I'll apply it in a couple of days if nobody says otherwise. Cc: Nicholas Vinson <nvinson234@gmail.com> Nicholas Vinson (1): libctf: Remove undefined functions from ver. map Nick Alcock (21): binutils, objdump: Add --ctf-parent-section libctf: don't leak the symbol name in the name->type cache libctf: remove static/dynamic name lookup distinction libctf: fix name lookup in dicts containing base-type bitfields libctf: support addition of types to dicts read via ctf_open() libctf: fix a comment libctf: delete LCTF_DIRTY libctf: fix a comment typo libctf: rename ctf_dict.ctf_{symtab,strtab} Revert "libctf: do not corrupt strings across ctf_serialize" libctf: replace 'pending refs' abstraction libctf: rethink strtab writeout libctf: make ctf_serialize() actually serialize libctf: fix tiny dumping error libctf: improve handling of type dumping errors libctf: make ctf_lookup of symbols by name work in more cases libctf: fix a debugging typo libctf: add rewriting tests libctf: fix leak in test libctf: don't pass errno into ctf_err_warn so often libctf: do not include undefined functions in libctf.ver binutils/doc/ctf.options.texi | 10 + binutils/objdump.c | 56 +- libctf/configure | 21 +- libctf/configure.ac | 21 +- libctf/ctf-archive.c | 9 +- libctf/ctf-create.c | 252 ++++--- libctf/ctf-dedup.c | 8 +- libctf/ctf-dump.c | 10 +- libctf/ctf-hash.c | 112 +--- libctf/ctf-impl.h | 116 ++-- libctf/ctf-link.c | 38 +- libctf/ctf-lookup.c | 372 +++++++---- libctf/ctf-open.c | 341 +++++----- libctf/ctf-serialize.c | 406 +++++------- libctf/ctf-string.c | 620 ++++++++++++------ libctf/ctf-subr.c | 6 +- libctf/ctf-types.c | 46 +- libctf/ctf-util.c | 13 - libctf/libctf.ver | 5 +- .../libctf-lookup/add-to-opened-ctf.c | 19 + .../testsuite/libctf-lookup/add-to-opened.c | 148 +++++ .../testsuite/libctf-lookup/add-to-opened.lk | 3 + .../libctf-lookup/conflicting-type-syms.c | 4 + .../libctf-regression/gzrewrite-ctf.c | 19 + .../testsuite/libctf-regression/gzrewrite.c | 165 +++++ .../testsuite/libctf-regression/gzrewrite.lk | 3 + libctf/testsuite/libctf-regression/zrewrite.c | 156 +++++ .../testsuite/libctf-regression/zrewrite.lk | 3 + .../libctf-bitfield-name-lookup.c | 136 ++++ .../libctf-bitfield-name-lookup.lk | 1 + 30 files changed, 1983 insertions(+), 1136 deletions(-) create mode 100644 libctf/testsuite/libctf-lookup/add-to-opened-ctf.c create mode 100644 libctf/testsuite/libctf-lookup/add-to-opened.c create mode 100644 libctf/testsuite/libctf-lookup/add-to-opened.lk create mode 100644 libctf/testsuite/libctf-regression/gzrewrite-ctf.c create mode 100644 libctf/testsuite/libctf-regression/gzrewrite.c create mode 100644 libctf/testsuite/libctf-regression/gzrewrite.lk create mode 100644 libctf/testsuite/libctf-regression/zrewrite.c create mode 100644 libctf/testsuite/libctf-regression/zrewrite.lk create mode 100644 libctf/testsuite/libctf-writable/libctf-bitfield-name-lookup.c create mode 100644 libctf/testsuite/libctf-writable/libctf-bitfield-name-lookup.lk
Comments
On 17 Apr 2024, Nick Alcock stated: > I'll apply it in a couple of days if nobody says otherwise. > > Cc: Nicholas Vinson <nvinson234@gmail.com> > > Nicholas Vinson (1): > libctf: Remove undefined functions from ver. map > > Nick Alcock (21): > binutils, objdump: Add --ctf-parent-section > libctf: don't leak the symbol name in the name->type cache > libctf: remove static/dynamic name lookup distinction > libctf: fix name lookup in dicts containing base-type bitfields > libctf: support addition of types to dicts read via ctf_open() > libctf: fix a comment > libctf: delete LCTF_DIRTY > libctf: fix a comment typo > libctf: rename ctf_dict.ctf_{symtab,strtab} > Revert "libctf: do not corrupt strings across ctf_serialize" > libctf: replace 'pending refs' abstraction > libctf: rethink strtab writeout > libctf: make ctf_serialize() actually serialize > libctf: fix tiny dumping error > libctf: improve handling of type dumping errors > libctf: make ctf_lookup of symbols by name work in more cases > libctf: fix a debugging typo > libctf: add rewriting tests > libctf: fix leak in test > libctf: don't pass errno into ctf_err_warn so often > libctf: do not include undefined functions in libctf.ver This is pushed now, exactly as here except for a couple of tiny GNU style fixes (the one pointed out by Alan, and a few similar ones in a couple of other commits).