From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mr3.vodafonemail.de (mr3.vodafonemail.de [145.253.228.163]) by sourceware.org (Postfix) with ESMTPS id 056FF385841C for ; Mon, 7 Aug 2023 18:35:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 056FF385841C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nexgo.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexgo.de; s=vfde-smtpout-mb-15sep; t=1691433327; bh=4GuFEw6bnbubV+ndYBme9nqO8CCPkqInoEZINRb+bNg=; h=From:To:Subject:Date:Message-ID:User-Agent:Content-Type:From; b=jvoB9RaQYhm7JbkDfiJED30I5WFvltg4wNWKh2bjzdSpAvZacTsvjbjU+ZyuXYK5O EZV0i1PeJRyjT/pKfrAVqUe9G0I2ed0ZF1r6NLBK2G0M20zLfn4NFYvE3wYzjYoHBn IpUUMws9fSfZoWTrbK/8hc1ISOypff+pYCxkDiIs= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4RKQ3z04Cpz1yt8 for ; Mon, 7 Aug 2023 18:35:26 +0000 (UTC) Received: from Gerda (p57b9d560.dip0.t-ipconnect.de [87.185.213.96]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RKQ3t294gzKm4H for ; Mon, 7 Aug 2023 18:35:18 +0000 (UTC) From: ASSI To: binutils@sourceware.org Subject: Replacement for "objdump -d -l"? Date: Mon, 07 Aug 2023 20:35:18 +0200 Message-ID: <87a5v24s61.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 2178 X-purgate-ID: 155817::1691433322-AE7DF106-B3D39D30/0/0 X-Spam-Status: No, score=-3028.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: As detailed in bug#30725, objdump performance has gradually worsened over the last releases to the point where it hurts. So I'm looking for alternatives=E2=80=A6 cygport at one point in time used llvm-objdump becaus= e it was faster at this, but currently we don't have a new enough llvm so that alternative is blocked. Of particular interest is "objdump -d -l" to produce the list of source files the object references so they can be put into the debuginfo package. Obviously the "-d" part is completely superfluous towards that goal as we're not even looking at the result, but there doesn't seem to be another way of getting the same information without it. So I've resigned to do an "objdump -WNl" instead and parse that output with a small Perl script (i.e. the directory and file tables)=E2=80=A6 with interesting results. Firstly, something that takes over an hour across 8C/16T with the current objdump (and over half an hour in the previous version) using "objdump -d -l", now takes not quite three seconds (that includes the actual dump and the parsing). Secondly, I get way more source files extracted with the Perl script: it seems that there are plenty of records that reference header files that are not output via "-d -l" for whatever reason. I might be able to actually parse the DWARF instructions following the tables to eliminate that difference, but before I try to do that, I'd like to know what exactly is the criterion for a source file to appear in the output of "objdump -d -l"? Lastly, it seem brittle to parse the output as clearly it is meant to be human readable and might change in future versions (aside from the fact there doesn't seem to be a documentation of the current format for crying out loud). I'd be much more content with a format that was designed to be machine readable and fully documented (again llvm has an objdump that produces YAML). Is there something like that in binutils I can use? Regards, Achim. --=20 +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada