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 E208D383575A; Tue, 28 Jun 2022 11:25:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E208D383575A Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25SBMFeo009156; Tue, 28 Jun 2022 11:25:49 GMT Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gwt89wqjx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Jun 2022 11:25:48 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25SBAsfY030869; Tue, 28 Jun 2022 11:25:48 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gwrt2frm8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Jun 2022 11:25:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OMaT+1cUu2DjRoE/D2jYGjA7Sagu9dmrTvVxq03H3/FNWuDSM385gAibBdIl2evyncA36EepV0WIKB3LGeOxSWBMpf7JMpG31Dc8RhOak75ZyNwxIrVabGOQplzv6Bu495Y6gxA0d7oqZemUkhAV0/vlcHPVdjSd8/j+2JjKOKZ3Grio+dkGUlpwFi41b2+FSInBKTxV1UNMuCor5Xfh57ZaCMgjTO5TulkSfcNAzD9j0TBWtFCQa4Q+YOHSnEoRpROIXzjdMlyjM/cRXZr4xgIRbJL/55l3LvXdfCuCh1k9vmVuTXJytosxt4A320Ohyrv2IenmUC74OtLu8bCntQ== 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=hNejiswjd3tHEs0ahNUTbm1SAdVe3atAhhPLdO8ypOU=; b=VgBEylE860tZ/sQGkeY5cXlHkfbtJCDA7mt5h2pfhuwgBZBjWyJADH6J7EGL8usnSBrs5oXyjgmsBOjyR1YdpiCoBbVr3ymIKePxXAijfcHOFAftQDrMKalQqN/yteLjh5L+HVPYYkQ36FTNYRSUZjW0oWipx6A+feVGnXw4hBLCJawOOqwkOR7LCJ9785ZQw9fuLaO1yLZTMYLJ6N1O/VwDIX+OIwaLLlJE4Fga/cQUb+gJZ0N5zIrbu83QZl+rOFHN/DtRP0prYji/N5n1x/O0UPonkKFGmbwiMSxz578SKzqWEUphsEKAn2FERWe6GK2GX++/g68a+nkwzuvuIw== 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 SA2PR10MB4715.namprd10.prod.outlook.com (2603:10b6:806:fb::10) by BYAPR10MB2967.namprd10.prod.outlook.com (2603:10b6:a03:87::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Tue, 28 Jun 2022 11:25:46 +0000 Received: from SA2PR10MB4715.namprd10.prod.outlook.com ([fe80::4cb4:a264:f2b2:a547]) by SA2PR10MB4715.namprd10.prod.outlook.com ([fe80::4cb4:a264:f2b2:a547%7]) with mapi id 15.20.5373.018; Tue, 28 Jun 2022 11:25:46 +0000 From: Nick Alcock To: Fangrui Song Cc: binutils@sourceware.org, gdb@sourceware.org, gnu-gabi@sourceware.org, gcc@gcc.gnu.org Subject: Re: New ch_type value ELFCOMPRESS_ZSTD? References: <20220627063859.27tgplebjcyxxdwi@gmail.com> Emacs: impress your (remaining) friends and neighbors. Date: Tue, 28 Jun 2022 12:25:40 +0100 In-Reply-To: <20220627063859.27tgplebjcyxxdwi@gmail.com> (Fangrui Song's message of "Sun, 26 Jun 2022 23:38:59 -0700") Message-ID: <874k05hvwr.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2.50 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0132.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::24) To SA2PR10MB4715.namprd10.prod.outlook.com (2603:10b6:806:fb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 090dec05-1b42-45d3-3ade-08da58f8f1ce X-MS-TrafficTypeDiagnostic: BYAPR10MB2967:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aWxS7cRhFFkgelikJsfgfzEJ5o6GwBzJd4QzTTUqJbEyuoR5iVzi5XUQZKK9yq8ofjXdkXpVJ4YrfWmmUEZa2Kb1N4L6owa3jHHACu5eUplqYnqED+yLfbJel2qfT9bfHnbLHteDo1XIBTyHbvTxuCpDBKJZcNw+n9aFb7JkkYXB01jfFRGGfV57V92OlXKeGWppoKDg7jpBP5qzv4OfFZRme46dH2vaW46xqJi85saBt7b5AEeODxbekOB1d9eg5JxWwatwqmaAX6UPf6JYqhjrS9D4t9f/H0mUAtdcZNXo0mGYnNf5o+fHSbhQVB3twtC3ENpMv479aQh1RKJbnVUXwINOoMhiLAKDvs926a03bbzofdrcp6FAf9sCsnX3Ax2R2mXXOQOL42SjJbjw2X5eptg0wu2N6Jq3WNBLd0ae5WelvpAaM63D0OihPP38naX1dcWm/8fmUfSJuXhIC5uhTguG/RqvRCrqcq4vopBtiOpc5G16fnavMhamJwjUpLTWQxv/ArWEl/BM3AkBJKsDvmHWgGmuV8giW7BvS+av6Ak1nLfh+wdlYGyqNnE631WcZqWxMN21GwdzfppCerKuVOq6RGL6xoBG5N7nPUrTa5mFzYPpYE6/oAhJ5kbYraAoekdkStj2fkP5Y25ZFRitWPHFo60jIyratM5EdB3GwjNeSShtZzFz2X9U6udHQHLPBQM5e9EY+m7+l4W+jLBP3koUwz22jCZNveLPjqOdf1YR9Od5hFeJqzXFzE31OdfCy3pGCr11D/gtrAbRwYt+eGAOFjD3o1tZjtkmxNU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4715.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(346002)(136003)(396003)(376002)(366004)(478600001)(8676002)(186003)(6486002)(36756003)(38100700002)(2906002)(52116002)(316002)(966005)(8936002)(6916009)(41300700001)(66946007)(5660300002)(66556008)(9686003)(44832011)(6512007)(4326008)(66476007)(6506007)(86362001)(6666004)(781001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zTQRdbJ8PwSp/3aW5mU17fPKsaDLOx9ElCw31YO7rk+10CPIrpcd9bkaOxKm?= =?us-ascii?Q?lilQeVOFo0d1imcn2gsxTOJd9LjoLKA6QkeyawnzjFeFZHGsydhgFbF4KsHm?= =?us-ascii?Q?RXKxJOt4QxNnwBYrOo850+4JDg3K3bt48C4Wj7HVcO6s0r4uZxoZ9iduv1uT?= =?us-ascii?Q?7R1PwhIFToZs49/5KU0NLgW5xrtjQUUDkl1vvVlwWXTK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NFbXhUfz2VCcEgPuCaRN9nqIt3hTd6noeq?= =?us-ascii?Q?+z5SZTtmeMl5V/MvDJjZoFP/svFnCa+HyzNrZz9vEQTOqzZ5NpG7BipGbDbI?= =?us-ascii?Q?iITzBQ2PX9XRr/fcYhCjlLjCIYoVqGVRD8pRwSx5PB1p50Syc7jxALJ7cbLZ?= =?us-ascii?Q?/Utt2x3j5xmvRwZBHOR00RjCdSVHvl+xYUgbs/mWMRYnz1PLIjm8jHOSQIeM?= =?us-ascii?Q?Z00n1Dc5diAV8wYcDY/Piolt0Pas/RjlQWb4TghKz/Tr1xaYfYN7r9rIasTc?= =?us-ascii?Q?7DxiGP8vGK+Oj5GYtd9puVSyzxITE098lWvKaG8mMQkeu5UPrzK3Jh0I0KV6?= =?us-ascii?Q?RuHXUEE3F7AGiPJSCPVlA6oq3kQn8vUqO8caMKthdYqogapD1566ryCiEW8m?= =?us-ascii?Q?dyntDea/xvPT1/npsju1XytsjgDv6r2j62Lj9KETGVTnLi9nh324Mf3KWoUb?= =?us-ascii?Q?m04BCSkBGBGuHUVx76rDZeH5CRxTdkJmdl99CBGdBgcMzF6IjpprfpcA6Jg5?= =?us-ascii?Q?XQ=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 090dec05-1b42-45d3-3ade-08da58f8f1ce X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4715.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 11:25:45.9710 (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: hipsFH4Oo11yyr5ZeQqXE6EkqmeC4BjCrRrNgqVk5hD72jS1kDbtTUTsuMq4mPFaFhKEPlVBfxslRZ1W7YPq4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2967 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-06-28_06:2022-06-24, 2022-06-28 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=546 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206280047 X-Proofpoint-ORIG-GUID: -Tzo_WGXSoOXB7-cC6lkGtS3kBpzc5d9 X-Proofpoint-GUID: -Tzo_WGXSoOXB7-cC6lkGtS3kBpzc5d9 X-Spam-Status: No, score=-5.7 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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 11:25:57 -0000 On 27 Jun 2022, Fangrui Song stated: > I created https://groups.google.com/g/generic-abi/c/satyPkuMisk ("Add new > ch_type value: ELFCOMPRESS_ZSTD") after I saw that on LLVM side, Cole Kissane > proposes that we add Zstandard as new compression method (mainly for .debug* > sections, but also for some LLVM internal things) > https://discourse.llvm.org/t/rfc-zstandard-as-a-second-compression-method-to-llvm/63399 The next CTF format will be compressed with zstd too (if available), fwiw. It's pretty obviously the right thing to go with these days for anything but specialized use cases. So (though my opinion counts for nothing) I think this is an excellent direction to go in. (Of course, if zstd isn't folded into the binutils source tree like zlib is, we have the interesting problem of what to do if it's not available at build time. If zstd compression is optional, and not available in the existing binutils, and gdb or objdump or something needs to read a zstd-compressed debug section, what do we do? Error out? Whatever it is we end up doing, I'll make libctf do the same thing in the same situation. Pointless detail: this will hardly ever impair use of things like ld that must keep working because ld inputs are usually compiler output, and the CTF in there is entirely uncompressed and undeduplicated. Only using ld -r outputs as inputs to ld would be affected, and that's a rare use case that is usually done as part of the same build process on the same machine, and that use case would *also* keep working whether zstd was available or not. The only case that might be impacted is users like GDB being asked to read zstd-compressed sections when GDB was not compiled with zstd support, and that's the same problem we'd have if the same binary contained DWARF debuginfo and the same GDB were asked to read it.) -- NULL && (void)