From 77d7cc83a7b04bdcea78360b0bf7387148b7b976 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Wed, 18 Apr 2012 15:46:58 +0200 Subject: [PATCH] --- yaml --- r: 299715 b: refs/heads/master c: 33ff581eddf744ea91a50d46c2f0961b375a9595 h: refs/heads/master i: 299713: 26e9446f76b96d17bb9df014cc3a69436b8b391b 299711: 80f2b16bbd0a84168e04fb2be5647f8785c559ce v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 516f8b1668f2..5a35c4273814 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7c72d888dac2c81003401d663bd8abd68e7c5cd +refs/heads/master: 33ff581eddf744ea91a50d46c2f0961b375a9595 diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index c0a028c3ebaf..ab9867b2b433 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -977,8 +977,9 @@ static Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, * And always look at the original dso, not at debuginfo packages, that * have the PLT data stripped out (shdr_rel_plt.sh_type == SHT_NOBITS). */ -static int dso__synthesize_plt_symbols(struct dso *dso, struct map *map, - symbol_filter_t filter) +static int +dso__synthesize_plt_symbols(struct dso *dso, char *name, struct map *map, + symbol_filter_t filter) { uint32_t nr_rel_entries, idx; GElf_Sym sym; @@ -993,10 +994,7 @@ static int dso__synthesize_plt_symbols(struct dso *dso, struct map *map, char sympltname[1024]; Elf *elf; int nr = 0, symidx, fd, err = 0; - char name[PATH_MAX]; - snprintf(name, sizeof(name), "%s%s", - symbol_conf.symfs, dso->long_name); fd = open(name, O_RDONLY); if (fd < 0) goto out; @@ -1703,8 +1701,9 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter) continue; if (ret > 0) { - int nr_plt = dso__synthesize_plt_symbols(dso, map, - filter); + int nr_plt; + + nr_plt = dso__synthesize_plt_symbols(dso, name, map, filter); if (nr_plt > 0) ret += nr_plt; break;