perf symbols: Make dso__load_bfd_symbols() load PE files from debug cache only
[linux-2.6-microblaze.git] / tools / perf / util / symbol.c
index 1645fb4..89a1d5f 100644 (file)
@@ -1568,7 +1568,7 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
        bfd *abfd;
        u64 start, len;
 
-       abfd = bfd_openr(dso->long_name, NULL);
+       abfd = bfd_openr(debugfile, NULL);
        if (!abfd)
                return -1;
 
@@ -1585,12 +1585,6 @@ int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
        if (section)
                dso->text_offset = section->vma - section->filepos;
 
-       bfd_close(abfd);
-
-       abfd = bfd_openr(debugfile, NULL);
-       if (!abfd)
-               return -1;
-
        if (!bfd_check_format(abfd, bfd_object)) {
                pr_debug2("%s: cannot read %s bfd file.\n", __func__,
                          debugfile);