Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299715
b: refs/heads/master
c: 33ff581
h: refs/heads/master
i:
  299713: 26e9446
  299711: 80f2b16
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Apr 20, 2012
1 parent 0e78c15 commit 77d7cc8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7c72d888dac2c81003401d663bd8abd68e7c5cd
refs/heads/master: 33ff581eddf744ea91a50d46c2f0961b375a9595
13 changes: 6 additions & 7 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 77d7cc8

Please sign in to comment.