projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d7245b
)
perf symbols: Fix annotation of vdso
author
Adrian Hunter
<
[email protected]
>
Fri, 14 Aug 2015 12:50:06 +0000
(15:50 +0300)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Mon, 17 Aug 2015 14:07:38 +0000
(11:07 -0300)
Older kernels attempt to prelink vdso to its virtual address. To permit
annotation using objdump, the map__rip_2objdump() calculation must
result in that same address which we can infer from the start and offset
of the text section.
Signed-off-by: Adrian Hunter <
[email protected]
>
Cc: Jiri Olsa <
[email protected]
>
Cc: Will Deacon <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/symbol-elf.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/symbol-elf.c
b/tools/perf/util/symbol-elf.c
index b0ad810f04dd6b536ccd5468b19a610068c4e1a8..53bb5f59ec589c22f7b1cd211cb132a3ca98d702 100644
(file)
--- a/
tools/perf/util/symbol-elf.c
+++ b/
tools/perf/util/symbol-elf.c
@@
-875,6
+875,17
@@
int dso__load_sym(struct dso *dso, struct map *map,
}
}
+ /*
+ * Handle any relocation of vdso necessary because older kernels
+ * attempted to prelink vdso to its virtual address.
+ */
+ if (dso__is_vdso(dso)) {
+ GElf_Shdr tshdr;
+
+ if (elf_section_by_name(elf, &ehdr, &tshdr, ".text", NULL))
+ map->reloc = map->start - tshdr.sh_addr + tshdr.sh_offset;
+ }
+
dso->adjust_symbols = runtime_ss->adjust_symbols || ref_reloc(kmap);
/*
* Initial kernel and module mappings do not map to the dso. For