perf symbols: Read plt symbols from proper symtab_type binary
authorJiri Olsa <jolsa@redhat.com>
Wed, 18 Apr 2012 13:46:58 +0000 (15:46 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 Apr 2012 16:34:49 +0000 (13:34 -0300)
commit33ff581eddf744ea91a50d46c2f0961b375a9595
treeb286b45ecba08ad147353d7f761ff9b0f12ea90c
parente7c72d888dac2c81003401d663bd8abd68e7c5cd
perf symbols: Read plt symbols from proper symtab_type binary

When loading symbols from DSO we check multiple paths of DSO binary
until we succeed to load symbols ('.symtab' section). Once symbols are
read we try to load also plt symbols.

During the reading of plt symbols, the dso file is reopened from
location given by dso->long_name. This could be wrong in case we want
process buildid binaries.

The change is to make the plt symbols being read from the DSO path, that
normal symbols were read from.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1334756818-6631-1-git-send-email-jolsa@redhat.com
[ committer note: moved dso to be the first parameter of that function ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c