From df664589d96d6ae5284da41594515a3a9a2fb590 Mon Sep 17 00:00:00 2001 From: Dave Martin Date: Mon, 9 Aug 2010 12:21:18 +0100 Subject: [PATCH] --- yaml --- r: 209262 b: refs/heads/master c: 696b97a5d2de9e2b22699300835e675dfffe8592 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 02f2669f6306..980456dcf498 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b1b0267336b1b74eeb8884bac4be96296b719e67 +refs/heads/master: 696b97a5d2de9e2b22699300835e675dfffe8592 diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index b6f5970f9106..1a367734e016 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -1079,6 +1079,16 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, if (!is_label && !elf_sym__is_a(&sym, map->type)) continue; + /* Reject ARM ELF "mapping symbols": these aren't unique and + * don't identify functions, so will confuse the profile + * output: */ + if (ehdr.e_machine == EM_ARM) { + if (!strcmp(elf_name, "$a") || + !strcmp(elf_name, "$d") || + !strcmp(elf_name, "$t")) + continue; + } + if (opdsec && sym.st_shndx == opdidx) { u32 offset = sym.st_value - opdshdr.sh_addr; u64 *opd = opddata->d_buf + offset;