From 71fa1fe39faa153cf6ede620c4855e508059aa39 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Wed, 29 Sep 2010 12:47:52 -0400 Subject: [PATCH] PR10812: relocate module build-id Relocate the build_id_vaddr obtained from dwfl_module_build_id. Failure to do this was causing ppc64 systems to fail the build-id check for cases such as: probe module("libata").function("*").call { printf ("%s\n", probefunc()) } Signed-off-by: Tony Jones --- translate.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/translate.cxx b/translate.cxx index 208b25958..cfdec5bc3 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4911,6 +4911,22 @@ dump_unwindsyms (Dwfl_Module *m, build_id_vaddr += main_bias; } #endif + + if (modname != "kernel") { + Dwarf_Addr reloc_vaddr = build_id_vaddr; + const char *secname; + int i; + + i = dwfl_module_relocate_address (m, &reloc_vaddr); + dwfl_assert ("dwfl_module_relocate_address", i >= 0); + + secname = dwfl_module_relocation_info (m, i, NULL); + dwfl_assert ("dwfl_module_relocation_info", + strcmp(secname, ".note.gnu.build-id") == 0); + + build_id_vaddr = reloc_vaddr; + } + if (c->session.verbose > 1) { clog << "Found build-id in " << name -- 2.43.5