public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Fr3v1 <bruceqiu2001@gmail.com>, elfutils-devel@sourceware.org
Subject: Re: How does eu_unstrip restore symbols
Date: Fri, 30 Jun 2023 13:56:19 +0200	[thread overview]
Message-ID: <100ceb2dcd5e065655310943c0dcf427abafe9eb.camel@klomp.org> (raw)
In-Reply-To: <CANgjZZeiU0uEO4dr7gz1o_Jcj-1vPHoHA1vOjJ+B=956-57bjg@mail.gmail.com>

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 amount
> of stripped binaries of Linux packages. The present approach is to restore
> 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

      reply	other threads:[~2023-06-30 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 10:09 Fr3v1
2023-06-30 11:56 ` Mark Wielaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=100ceb2dcd5e065655310943c0dcf427abafe9eb.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=bruceqiu2001@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).