Commit bff8b307 authored by Nicholas Fraser's avatar Nicholas Fraser Committed by Arnaldo Carvalho de Melo

perf symbol: Remove redundant libbfd checks

This removes the redundant checks bfd_check_format() and
bfd_target_elf_flavour. They were previously checking different files.
Signed-off-by: default avatarNicholas Fraser <nfraser@codeweavers.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Huw Davies <huw@codeweavers.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kim Phillips <kim.phillips@amd.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Remi Bernon <rbernon@codeweavers.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
Cc: Ulrich Czekalla <uczekalla@codeweavers.com>
Link: https://lore.kernel.org/r/94758ca1-0031-d7c6-6c6a-900fd77ef695@codeweavers.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 11d45d4f
...@@ -1585,15 +1585,6 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile) ...@@ -1585,15 +1585,6 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
if (section) if (section)
dso->text_offset = section->vma - section->filepos; dso->text_offset = section->vma - section->filepos;
if (!bfd_check_format(abfd, bfd_object)) {
pr_debug2("%s: cannot read %s bfd file.\n", __func__,
debugfile);
goto out_close;
}
if (bfd_get_flavour(abfd) == bfd_target_elf_flavour)
goto out_close;
symbols_size = bfd_get_symtab_upper_bound(abfd); symbols_size = bfd_get_symtab_upper_bound(abfd);
if (symbols_size == 0) { if (symbols_size == 0) {
bfd_close(abfd); bfd_close(abfd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment