From: Anton Blanchard <an...@samba.org> 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: <sta...@kernel.org> Cc: Ingo Molnar <mi...@elte.hu> Cc: Paul Mackerras <pau...@samba.org> Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Eric B Munson <emun...@mgebm.net> Link: http://lkml.kernel.org/r/20110824065242.895239...@samba.org Signed-off-by: Anton Blanchard <an...@samba.org> Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/perf/util/symbol.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 469c026..bb5d32f 100644 --- 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); -- 1.6.2.5 _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable