From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 3ACF43858417 for ; Mon, 7 Aug 2023 17:43:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3ACF43858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-564b326185bso2077182a12.2 for ; Mon, 07 Aug 2023 10:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691430209; x=1692035009; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=l7lgzVbi8s9ujXD/G+X86ByoBWm/W4RnK8W4nGO130g=; b=ll2WA/e9Tpl1sbQKWgHfhWzFop+etmKXAz+anHNzJyTg4yTyCkr0WcWTlGy0U/MchO f0Dtrw/4dvHvF+BugN7xTr5AvoKLXUEJZBztyGB2KxaXWnOoHEWlDg0ll9xTi0DQh62N YuH4VJmMc5yprlgZZV8bCgJZefLdUhw48zfQo2jY9EfHesmbGx9FqOfrvrZve8HRza+7 HXBYv26MlIuXvLkCHEXrKgnPsorkbK6WxxxpnYwnObMoUJTPT9TavVY/UbhA+bG2uiJy 0p7YgSBpQyT9YXLjuk63cVvEIqcrNrmFoHe4bSZtlPX+Ii2CpbuPPMpSekUMoAVD2hzg byWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691430209; x=1692035009; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l7lgzVbi8s9ujXD/G+X86ByoBWm/W4RnK8W4nGO130g=; b=GnrJgZ8Mgg/Nrrgb9KEQrO5ckqfVb54Z+/a8JMSMT1YXTBLN6HgmCp/26iKhrNlbLP eV5TeByDrQrn/7rMZa+K5J4Xc7KVJf15DQv+9s0XXsQn0Prw3R/Qu1qa9yjysUQ+jyZq UKhZtBU6JR0zgXYW3k6g500d/1m91dnI5RLH9vzi7SatD6meO/kp71QqdSAYpoRPYonn +gxcaOxxeNXwE6OeCWEkZDcboa7vIOzX2S9PdjCj7OolbEPZna0saTxR/OJ4113YLa4y 4PtXtD+NYUQv+izZCgBh1+MPviioy5UM/jlFz8/U+rtZ8ZOjM7z34kDBswaATi9I+gJQ f/2A== X-Gm-Message-State: AOJu0YywBloWIgtYbddPE7dA0BdUAAVWg/KMQsxntlZs1z7UpZ6akzoU R/BvBaEx16nwke/bSXRQbKc= X-Google-Smtp-Source: AGHT+IFTNtXCPzgHJ9OcL+0P/kp1X7irX32Yw+XPct7EcIfs3yLN9dVN+w9LkKMb5TMeD9uAjVon7g== X-Received: by 2002:a17:90a:6f03:b0:268:6670:46df with SMTP id d3-20020a17090a6f0300b00268667046dfmr6471775pjk.27.1691430209147; Mon, 07 Aug 2023 10:43:29 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id p17-20020a170902ead100b001b8b26fa6c1sm7185857pld.115.2023.08.07.10.43.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Aug 2023 10:43:28 -0700 (PDT) Message-ID: Date: Mon, 7 Aug 2023 11:43:27 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 07/24] binutils, gdb: support zstd compressed debug sections Content-Language: en-US To: =?UTF-8?Q?Arsen_Arsenovi=c4=87?= , gcc-patches@gcc.gnu.org Cc: Fangrui Song References: <20230807105935.2098236-1-arsen@aarsen.me> <20230807105935.2098236-8-arsen@aarsen.me> From: Jeff Law In-Reply-To: <20230807105935.2098236-8-arsen@aarsen.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On 8/7/23 04:32, Arsen Arsenović via Gcc-patches wrote: > From: Fangrui Song > > PR29397 PR29563: Add new configure option --with-zstd which defaults to > auto. If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support > zstd compressed debug sections for most tools. > > * bfd: for addr2line, objdump --dwarf, gdb, etc > * gas: support --compress-debug-sections=zstd > * ld: support ELFCOMPRESS_ZSTD input and --compress-debug-sections=zstd > * objcopy: support ELFCOMPRESS_ZSTD input for > --decompress-debug-sections and --compress-debug-sections=zstd > * gdb: support ELFCOMPRESS_ZSTD input. The bfd change references zstd > symbols, so gdb has to link against -lzstd in this patch. > > If zstd is not supported, ELFCOMPRESS_ZSTD input triggers an error. We > can avoid HAVE_ZSTD if binutils-gdb imports zstd/ like zlib/, but this > is too heavyweight, so don't do it for now. > > ``` > % ld/ld-new a.o > ld/ld-new: a.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support > ... > > % ld/ld-new a.o --compress-debug-sections=zstd > ld/ld-new: --compress-debug-sections=zstd: ld is not built with zstd support > > % binutils/objcopy --compress-debug-sections=zstd a.o b.o > binutils/objcopy: --compress-debug-sections=zstd: binutils is not built with zstd support > > % binutils/objcopy b.o --decompress-debug-sections > binutils/objcopy: zstd.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support > ... > ``` > > config/ChangeLog: > > * zstd.m4: New file. > > ChangeLog: > * configure: Regenerate. > * configure.ac: Add --with-zstd. OK jeff