From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id A561E3860758 for ; Fri, 30 Jun 2023 11:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A561E3860758 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 342E03006CF5; Fri, 30 Jun 2023 13:56:22 +0200 (CEST) Received: by r6.localdomain (Postfix, from userid 1000) id EBE7E3402EA; Fri, 30 Jun 2023 13:56:19 +0200 (CEST) Message-ID: <100ceb2dcd5e065655310943c0dcf427abafe9eb.camel@klomp.org> Subject: Re: How does eu_unstrip restore symbols From: Mark Wielaard To: Fr3v1 , elfutils-devel@sourceware.org Date: Fri, 30 Jun 2023 13:56:19 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3 (3.48.3-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-3028.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,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 List-Id: Hi Fr3v1, On Thu, 2023-06-29 at 18:09 +0800, Fr3v1 via Elfutils-devel wrote: > Hi there, I want to get the function names and addresses of a large amoun= t > of stripped binaries of Linux packages. The present approach is to restor= e > symbol names by using 'eu_unstrip' and the .debug file within the > corresponding .ddeb file. After you done that, which information on the functions do you extract and how do you do that? How do you store this information and what is it being used for? > So here are my two questions: 1. Is there another way to get the function > names and their addresses? You can run eu-readelf -s on both the main executable and the .debug file. The main executable will at least contain the .dynsym symbols, the .debug file will have the .symtab symbols in most cases. > 2. How does eu_unstirp work, does it really make > stripped one 'unstrip'? Yes, that how it works, it merges the sections from the main executable and the separate debug file into one as it was before separating them. > Will it occur to some kind of precision error 3. > How fast is it for like 10 million tiny binaries? I think you will have to measure that yourself. Cheers, Mark