From: Jiri Olsa <jolsa@redhat.com>
To: Remi Bernon <rbernon@codeweavers.com>
Cc: linux-kernel@vger.kernel.org,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jacek Caban <jacek@codeweavers.com>
Subject: Re: [PATCH v2 2/3] perf symbols: Try reading the symbol table with libbfd
Date: Tue, 4 Aug 2020 22:32:49 +0200 [thread overview]
Message-ID: <20200804203249.GJ139381@krava> (raw)
In-Reply-To: <20200804085736.385232-2-rbernon@codeweavers.com>
On Tue, Aug 04, 2020 at 10:57:35AM +0200, Remi Bernon wrote:
SNIP
> +
> +int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
> +{
> + int err = -1;
> + long symbols_size, symbols_count;
> + asection *section;
> + asymbol **symbols, *sym;
> + struct symbol *symbol;
> + bfd *abfd;
> + u_int i;
> + u64 start, len;
> +
> + abfd = bfd_openr(dso->long_name, NULL);
> + if (!abfd)
> + return -1;
> +
> + if (!bfd_check_format(abfd, bfd_object)) {
> + pr_debug2("%s: cannot read %s bfd file.\n", __func__,
> + dso->long_name);
> + goto out_close;
> + }
> +
> + if (bfd_get_flavour(abfd) == bfd_target_elf_flavour)
> + goto out_close;
aah, so the code is actualy only for non elf objects,
somehow I thought it's replacing the symbol load globaly
jirka
next prev parent reply other threads:[~2020-08-04 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 8:57 [PATCH v2 1/3] perf dso: Use libbfd to read build_id and .gnu_debuglink section Remi Bernon
2020-08-04 8:57 ` [PATCH v2 2/3] perf symbols: Try reading the symbol table with libbfd Remi Bernon
2020-08-04 20:32 ` Jiri Olsa [this message]
2020-08-05 6:50 ` Remi Bernon
2020-08-04 8:57 ` [PATCH v2 3/3] perf tests: Add test for PE binary format support Remi Bernon
2020-08-04 21:14 ` Jiri Olsa
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=20200804203249.GJ139381@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jacek@codeweavers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rbernon@codeweavers.com \
/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