Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312323
b: refs/heads/master
c: 1388d71
h: refs/heads/master
i:
  312321: e3883ba
  312319: 30705be
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jun 29, 2012
1 parent b7dfe75 commit b83484d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bc8f9fe2c6e3778202c76ef85ef291567c00cb8
refs/heads/master: 1388d715dd7d0f494c93dfdef6ab26719218b868
29 changes: 23 additions & 6 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1478,14 +1478,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)
Expand Down

0 comments on commit b83484d

Please sign in to comment.