projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f66fedc
)
perf symbols: Fix ppc64 SEGV in dso__load_sym with debuginfo files
author
Anton Blanchard
<
[email protected]
>
Wed, 24 Aug 2011 06:40:14 +0000
(16:40 +1000)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Fri, 23 Sep 2011 17:35:57 +0000
(14:35 -0300)
64bit PowerPC debuginfo files have an empty function descriptor section.
I hit a SEGV when perf tried to use this section for symbol resolution.
To fix this we need to check the section is valid and we can do this by
checking for type SHT_PROGBITS.
Cc: <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Eric B Munson <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Anton Blanchard <
[email protected]
>
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/symbol.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/symbol.c
b/tools/perf/util/symbol.c
index 469c0264ed298d138698d93206419b87fbb3dd99..bb5d32f38af2f4fbde3eda4bf71820c25fb79302 100644
(file)
--- a/
tools/perf/util/symbol.c
+++ b/
tools/perf/util/symbol.c
@@
-1111,6
+1111,8
@@
static int dso__load_sym(struct dso *dso, struct map *map, const char *name,
}
opdsec = elf_section_by_name(elf, &ehdr, &opdshdr, ".opd", &opdidx);
+ if (opdshdr.sh_type != SHT_PROGBITS)
+ opdsec = NULL;
if (opdsec)
opddata = elf_rawdata(opdsec, NULL);