lkml.org 
[lkml]   [2020]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] perf symbols: Try reading the symbol table with libbfd
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

\
 
 \ /
  Last update: 2020-08-04 22:34    [W:1.048 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site