From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id D68453858404 for ; Tue, 27 Sep 2022 18:53:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D68453858404 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-lj1-x22b.google.com with SMTP id x29so11972046ljq.2 for ; Tue, 27 Sep 2022 11:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=u/UT2eEvxBf2uvwmr1+VFcF2M+VB2qVRedyumgLK874=; b=BhB6EX78cpP5YfWw4jHh0eLQvSWc8JsMT/n2QbdHkZZrhN3R5U9eBWOxf3WqffbEZ+ 7fU1B6DN1x6bmYuZdOLHYMUy5ucPBsVkDYVM/c+CrPMPUuM4/MDJU2Zxq+BfVKTK71OK MIUv8arV2VuzRW5y7zxmWh7SVn5mYA1XPdh/ZW5kyrAYkbRAPXhtOqVnke0aXL0vh6lm vFu86HlN5K1Zrv9oo0OjRQdbFcwy9m+uZP2YC8/AQYEMlhtFshfee+upJv8F+9ZXHPqS OiSlKRQ8dXigLveBE0h+U6ymvJIIImnvUL2oWCr8PB/ogvV58Jf2hR4lhNkI/tK5qsdO JJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=u/UT2eEvxBf2uvwmr1+VFcF2M+VB2qVRedyumgLK874=; b=KnVUXh9mdTyJ287WWjHqOgLyz35sXJ4P1UWH6QZe0PJrSG93TRip02wqlDhHV4l3z7 7KgVgvxkDESK/QXKhGbdOICY1206mseB42NZCZdSDzF4M/jd2YMg0gjdys2eibss0toU T3g5FlH2m9Lo/OdHKVw6gTiLzGJPGhMflnZdw5EAI9eODrXQYWOih7AJgz9isMBkXPxZ 1VpISSB2BIOAQokvMbsd8OqsqJTmw/TDvUxO0aELxsv3nIifwa7bu5Y3HbKB8F7bu06+ dE4eU2kJSXKX+tkin22pzh/9n3ZM8dr8cRHGCUjTPOb2PmNu5/ZrBC6zBskaKM5yCAFQ nJJw== X-Gm-Message-State: ACrzQf3IPrz/18wSR430DDQJXk/cqxyfSRbvcJ2BUkLildWBO07TehTx TJ3Ow/H9e3aUnpTkPeWg+97VItJlC54sOyn8Ujh1+Q== X-Google-Smtp-Source: AMsMyM7gC8NQuFB+DJyB6r2QEnXSpVvRleDtlXDN4I7YsNJjDM8lu9s0YMc4tO74w6mpK7gZe7//ch2L9y8YN7g3yGk= X-Received: by 2002:a05:651c:1112:b0:26c:7323:3f2c with SMTP id e18-20020a05651c111200b0026c73233f2cmr10259819ljo.4.1664304803199; Tue, 27 Sep 2022 11:53:23 -0700 (PDT) MIME-Version: 1.0 References: <20220923040837.550160-1-maskray@google.com> <87o7v0zo4b.fsf@tromey.com> In-Reply-To: <87o7v0zo4b.fsf@tromey.com> From: Fangrui Song Date: Tue, 27 Sep 2022 11:53:10 -0700 Message-ID: Subject: Re: [PATCH v3] binutils, gdb: support zstd compressed debug sections To: Tom Tromey Cc: Fangrui Song via Gdb-patches , Alan Modra , Jan Beulich , Nick Clifton , Simon Marchi , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Tue, Sep 27, 2022 at 11:08 AM Tom Tromey wrote: > > >>>>> Fangrui Song via Gdb-patches writes: > > > PR29397 PR29563: The new configure option --with-zstd 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. > > This also needs some change to the sims. > I see failures like this with git master: > > make[4]: Entering directory '/home/tromey/gdb/build/sim/bpf' > CCLD run > ../../bfd/libbfd.a(compress.o):compress.c:function decompress_contents: error: undefined reference to 'ZSTD_decompress' > ../../bfd/libbfd.a(compress.o):compress.c:function decompress_contents: error: undefined reference to 'ZSTD_isError' > (unknown):176: error: undefined reference to 'ZSTD_compress' > (unknown):179: error: undefined reference to 'ZSTD_isError' > collect2: error: ld returned 1 exit status > > You'll see them all if you do a build with all sims enabled. > > thanks, > Tom Thanks for the report and Tom's IRC chat with me about the `../../configure --enable-targets --enable-sim; make all-gdb` build. Tom confirmed that the latest commit `sim: Link ZSTD_LIBS` has fixed the problem.