mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Cc: Arun Sharma <[email protected]> Cc: Benjamin Redelings <[email protected]> Cc: Corey Ashford <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Frank Ch. Eigler <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Richter <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Tom Zanussi <[email protected]> Cc: Ulrich Drepper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
9bc8f9fe2c
commit
1388d715dd
1 changed files with 23 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue