Messages in this thread Patch in this message | | | From | Jiri Olsa <> | Subject | [PATCH 08/16] perf, tool: Add '.note' check into search for NOTE section | Date | Tue, 17 Apr 2012 13:17:13 +0200 |
| |
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> --- 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 1e42034..9c0fa32 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1474,14 +1474,31 @@ static int elf_read_build_id(Elf *elf, void *bf, size_t size) goto out; } - sec = elf_section_by_name(elf, &ehdr, &shdr, - ".note.gnu.build-id", NULL); - if (sec == NULL) { + /* + * Check following sections for notes: + * '.note.gnu.build-id' + * '.notes' + * '.note' (VDSO specific) + */ + do { + sec = elf_section_by_name(elf, &ehdr, &shdr, + ".note.gnu.build-id", NULL); + if (sec) + break; + sec = elf_section_by_name(elf, &ehdr, &shdr, ".notes", NULL); - if (sec == NULL) - goto out; - } + if (sec) + break; + + sec = elf_section_by_name(elf, &ehdr, &shdr, + ".note", NULL); + if (sec) + break; + + return err; + + } while (0); data = elf_getdata(sec, NULL); if (data == NULL) -- 1.7.7.6
| |