diff options
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index c0a028c3ebaf..ab9867b2b433 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -977,8 +977,9 @@ static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, | |||
977 | * And always look at the original dso, not at debuginfo packages, that | 977 | * And always look at the original dso, not at debuginfo packages, that |
978 | * have the PLT data stripped out (shdr_rel_plt.sh_type == SHT_NOBITS). | 978 | * have the PLT data stripped out (shdr_rel_plt.sh_type == SHT_NOBITS). |
979 | */ | 979 | */ |
980 | static int dso__synthesize_plt_symbols(struct dso *dso, struct map *map, | 980 | static int |
981 | symbol_filter_t filter) | 981 | dso__synthesize_plt_symbols(struct dso *dso, char *name, struct map *map, |
982 | symbol_filter_t filter) | ||
982 | { | 983 | { |
983 | uint32_t nr_rel_entries, idx; | 984 | uint32_t nr_rel_entries, idx; |
984 | GElf_Sym sym; | 985 | GElf_Sym sym; |
@@ -993,10 +994,7 @@ static int dso__synthesize_plt_symbols(struct dso *dso, struct map *map, | |||
993 | char sympltname[1024]; | 994 | char sympltname[1024]; |
994 | Elf *elf; | 995 | Elf *elf; |
995 | int nr = 0, symidx, fd, err = 0; | 996 | int nr = 0, symidx, fd, err = 0; |
996 | char name[PATH_MAX]; | ||
997 | 997 | ||
998 | snprintf(name, sizeof(name), "%s%s", | ||
999 | symbol_conf.symfs, dso->long_name); | ||
1000 | fd = open(name, O_RDONLY); | 998 | fd = open(name, O_RDONLY); |
1001 | if (fd < 0) | 999 | if (fd < 0) |
1002 | goto out; | 1000 | goto out; |
@@ -1703,8 +1701,9 @@ restart: | |||
1703 | continue; | 1701 | continue; |
1704 | 1702 | ||
1705 | if (ret > 0) { | 1703 | if (ret > 0) { |
1706 | int nr_plt = dso__synthesize_plt_symbols(dso, map, | 1704 | int nr_plt; |
1707 | filter); | 1705 | |
1706 | nr_plt = dso__synthesize_plt_symbols(dso, name, map, filter); | ||
1708 | if (nr_plt > 0) | 1707 | if (nr_plt > 0) |
1709 | ret += nr_plt; | 1708 | ret += nr_plt; |
1710 | break; | 1709 | break; |