From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 02B963858D1E for ; Mon, 15 Aug 2022 17:06:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 02B963858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=harmstone.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x42f.google.com with SMTP id p10so9761879wru.8 for ; Mon, 15 Aug 2022 10:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc; bh=KhyQnT5Xk0qYiDfaTx2GAUtcQ7STQlDz+BXYQ1mitrA=; b=Uow4NySTVAzKmiYBCDJvccikNUZVyj1DpID8yz4cMW430Ss89R7xZxiVH4DRFq7DMd PQ8wa4GZrFnbPL9u4wxyhOO8fZbABzaZLAFqsJ0bO+8VFmbBb+3MCPYrj4CFB4C0wunr LNOuclv2fCW2v/iiCsEaFamykYq/4Sz1b1WeFnO68S/DDz7WCHB4fe/+E4WKZBYcXNH+ t2f+wRbdWD39o0NCExqw0Rwp+P2ce3kEm1PEEmd8a2C6ppuwL66bfmtRcse2sUBqP5K0 GZViWz7r9ENSK+YviS3vq+6WaF0LPVwtVtzYGT0SNqi2pHUramUosySxXXZ3fLWKH4xS jqlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc; bh=KhyQnT5Xk0qYiDfaTx2GAUtcQ7STQlDz+BXYQ1mitrA=; b=XrzZQTaoKv/KjAB9WUUOeWHGlnPZX0fqCTKoQRX45uheQ0tTsfoCWDmoIx8ItTyA31 hA86TJpHtTofA/GJBgHajfdpPgCXs9Gexuww7Maf21Ip6+VDouO78BHM3iIzuu3N2ie2 ffv6nNEpwiSXGBE76COdKF+2G3Xsi+O4u5bi9NeNiXgqwKxZTwxnnA1r4Ia81tGCiz8q AqgSgoW4r0h2C/iB1FJLavVuxuk6vANWLW1HMidFjcKANEpzI9dk/4Z88+zYHl6HZX9y +61lqKxRDQvMyaQM1IhQhgXkckOkoYAA2QKmYxFKoQZHKfCoXLbtAQvMhd0zJ3LMp399 0x7w== X-Gm-Message-State: ACgBeo3axCfyvh0j05IugBhTzhN0m9RpEqaWRBeTWc8r+h8VW2OHoDRk umWBwiJXnKwOm2mrJj3gPczHJUXQPxDMLw== X-Google-Smtp-Source: AA6agR7EcUAHwHIiY/GMYIcRhTA12hitODdw2p01CBs7vjOaXbieXVQtB0h+A8XmdNmalEGYWb7/Wg== X-Received: by 2002:adf:a54a:0:b0:225:14b:36a with SMTP id j10-20020adfa54a000000b00225014b036amr4177853wrb.385.1660583205449; Mon, 15 Aug 2022 10:06:45 -0700 (PDT) Received: from ?IPV6:2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f? ([2a02:8010:64ea:0:8eb8:7eff:fe53:9d5f]) by smtp.googlemail.com with ESMTPSA id j27-20020a05600c1c1b00b003a32251c3f9sm10859913wms.5.2022.08.15.10.06.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Aug 2022 10:06:44 -0700 (PDT) Sender: Mark Harmstone Message-ID: <9f1aa9fe-db52-b92c-ae5c-18873f838145@harmstone.com> Date: Mon, 15 Aug 2022 18:06:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0 Subject: Re: [PATCH] Add pdb archive target To: Jan Beulich Cc: binutils@sourceware.org References: <20220725234405.19880-1-mark@harmstone.com> <182ff63d-9b76-3897-4da0-9641ac27f5c9@harmstone.com> Content-Language: en-US From: Mark Harmstone In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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, 15 Aug 2022 17:06:51 -0000 On 12/8/22 07:14, Jan Beulich wrote: > On 12.08.2022 01:26, Mark Harmstone wrote: >> On 11/8/22 14:02, Jan Beulich wrote: >>  > On 26.07.2022 01:44, Mark Harmstone wrote: >>  >> This adds support for the "Multi-Stream Format" container format that >>  >> MSVC uses for its PDB debugging files, as documented at >>  >> https://llvm.org/docs/PDB/MsfFile.html. >>  > >>  > Looking at binutils/testsuite/binutils-all/pdb*.d I wonder what "support" >>  > here means: What is dumped is the binary contents of the file (claimed >>  > to be coming from section .data) rather than the inner file structure. >> >> I'm not quite sure what you're getting at. This is purely for PDB files as >> archives, there is no inner file structure. The tests check that the hex >> dump of the files matches one possible way to represent an archive of the >> dummy files. > > If it's an archive (and hence can hold multiple files), then surely it > has an internal structure. Or else your patch also wouldn't be needed, > btw. Dumping a *.a file gives you an idea what's in the file. I would > have expected the same for *.pdb (to a reasonable extent at least). > One might then easily see number of members, block size, etc. Perhaps > even the sizes of the individual members. Right, I see what you mean - so that "objdump -x" gives you something interesting... >>  > Is there a reason for this 4-or-more digits naming of the file? Would >>  > it make sense to use 8 digits (beyond which the index apparently >>  > cannot grow)? >> >> In practice, 4 digits is plenty. The number of files in the archive is >> proportional to the number of object files linked into the image... for the >> NT kernel, which is probably the most complicated EXE out there, the PDB >> has 1,100 files. I can't imagine anybody will ever go over 65,535 - and it's >> not visible anyway, unless you play around with ar. > > Since you know the number of files in the archive, may I suggest that you > base the number of digits on that number of members, such that all > elements would be extracted to files with names of identical length? Yep, good idea. Thanks for your help Jan - I'll submit another patch incorporating your suggestions shortly. Mark