summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2010-01-18 09:13:30 +0100
committerMark Wielaard <mjw@redhat.com>2010-01-18 09:20:25 +0100
commit08d1d520616557f6ff7dd023e260ad6577e9e0e8 (patch)
treef9c9efe542ca78826caedb6f8981fa73336552d5 /dwflpp.cxx
parent27ca40f711f4ab4b0234390443e63b7916a61551 (diff)
downloadsystemtap-steved-08d1d520616557f6ff7dd023e260ad6577e9e0e8.tar.gz
systemtap-steved-08d1d520616557f6ff7dd023e260ad6577e9e0e8.tar.xz
systemtap-steved-08d1d520616557f6ff7dd023e260ad6577e9e0e8.zip
PR11173 Markers get a bad address in prelinked libraries.
Our literal_addr_to_sym_addr() function was just wrong. To compensate for raw addresses read from elf (either given by the user or through a mark transformation) we need to know what the elf_bias is (as returned by dwfl_module_getelf) before feeding them to any libdwfl functions. * tapsets.cxx (query_module_dwarf): Always add elf_bias to raw function or statement addresses before calling query_addr(). (query_addr): Don't call literal_addr_to_sym_addr(). * dwflpp.h (literal_addr_to_sym_addr): Removed. * dwflpp.cxx (literal_addr_to_sym_addr): Likewise.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx39
1 files changed, 0 insertions, 39 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 7dd31d06..e6fe017d 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -2771,45 +2771,6 @@ dwflpp::relocate_address(Dwarf_Addr dw_addr, string& reloc_section)
return reloc_addr;
}
-/* Converts a "global" literal address to the module symbol address
- * space. If necessary (not for kernel and executables using absolute
- * addresses), this adjust the address for the current module symbol
- * bias. Literal addresses are provided by the user (or contained on
- * the .probes section) based on the "on disk" layout of the module.
- */
-Dwarf_Addr
-dwflpp::literal_addr_to_sym_addr(Dwarf_Addr lit_addr)
-{
- if (sess.verbose > 2)
- clog << "literal_addr_to_sym_addr 0x" << hex << lit_addr << dec << endl;
-
- // Assume the address came from the symbol list.
- // If we cannot get the symbol bias fall back on the dw bias.
- // The kernel (and other absolute executable modules) is special though.
- if (module_name != TOK_KERNEL
- && dwfl_module_relocations (module) > 0)
- {
- Dwarf_Addr symbias = ~0;
- if (dwfl_module_getsymtab (module) != -1)
- dwfl_module_info (module, NULL, NULL, NULL, NULL,
- &symbias, NULL, NULL);
-
- if (sess.verbose > 3)
- clog << "symbias 0x" << hex << symbias << dec
- << ", dwbias 0x" << hex << module_bias << dec << endl;
-
- if (symbias == (Dwarf_Addr) ~0)
- symbias = module_bias;
-
- lit_addr += symbias;
- }
-
- if (sess.verbose > 2)
- clog << "literal_addr_to_sym_addr ret 0x" << hex << lit_addr << dec << endl;
-
- return lit_addr;
-}
-
/* Returns the call frame address operations for the given program counter
* in the libdw address space.
*/