diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-06-19 11:48:05 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-29 12:37:57 -0400 |
commit | 1388d715dd7d0f494c93dfdef6ab26719218b868 (patch) | |
tree | a4b9f57de2c823fc2c6cfa24baf20081418967c8 /tools/perf | |
parent | 9bc8f9fe2c6e3778202c76ef85ef291567c00cb8 (diff) |
perf symbols: Add '.note' check into search for NOTE section
Adding '.note' section name to be check when looking for notes section.
The '.note' name is used by kernel VDSO.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arun Sharma <asharma@fb.com>
Cc: Benjamin Redelings <benjamin.redelings@nescent.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Ulrich Drepper <drepper@gmail.com>
Link: http://lkml.kernel.org/r/1340120894-9465-15-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/symbol.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 994f4ffdcd05..50958bbeb26a 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1478,14 +1478,31 @@ static int elf_read_build_id(Elf *elf, void *bf, size_t size) | |||
1478 | goto out; | 1478 | goto out; |
1479 | } | 1479 | } |
1480 | 1480 | ||
1481 | sec = elf_section_by_name(elf, &ehdr, &shdr, | 1481 | /* |
1482 | ".note.gnu.build-id", NULL); | 1482 | * Check following sections for notes: |
1483 | if (sec == NULL) { | 1483 | * '.note.gnu.build-id' |
1484 | * '.notes' | ||
1485 | * '.note' (VDSO specific) | ||
1486 | */ | ||
1487 | do { | ||
1488 | sec = elf_section_by_name(elf, &ehdr, &shdr, | ||
1489 | ".note.gnu.build-id", NULL); | ||
1490 | if (sec) | ||
1491 | break; | ||
1492 | |||
1484 | sec = elf_section_by_name(elf, &ehdr, &shdr, | 1493 | sec = elf_section_by_name(elf, &ehdr, &shdr, |
1485 | ".notes", NULL); | 1494 | ".notes", NULL); |
1486 | if (sec == NULL) | 1495 | if (sec) |
1487 | goto out; | 1496 | break; |
1488 | } | 1497 | |
1498 | sec = elf_section_by_name(elf, &ehdr, &shdr, | ||
1499 | ".note", NULL); | ||
1500 | if (sec) | ||
1501 | break; | ||
1502 | |||
1503 | return err; | ||
1504 | |||
1505 | } while (0); | ||
1489 | 1506 | ||
1490 | data = elf_getdata(sec, NULL); | 1507 | data = elf_getdata(sec, NULL); |
1491 | if (data == NULL) | 1508 | if (data == NULL) |