diff options
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 540b3bc4..9fbad6bb 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1365,6 +1365,17 @@ struct dwflpp modname, secname, address); obstack_printf (pool, "addr; })"); } + else if (n == 1 && module_name == TOK_KERNEL && secname[0] == '\0') + { + // elfutils' way of telling us that this is a relocatable kernel address, which we + // need to treat the same way here as dwarf_query::add_probe_point does: _stext. + address -= sess.sym_stext; + secname = "_stext"; + obstack_printf (pool, "({ static unsigned long addr = 0; "); + obstack_printf (pool, "if (addr==0) addr = _stp_module_relocate (\"%s\",\"%s\",%#" PRIx64 "); ", + modname, secname, address); + obstack_printf (pool, "addr; })"); + } else { throw semantic_error ("cannot relocate user-space dso (?) address"); @@ -3649,6 +3660,11 @@ dwarf_derived_probe::dwarf_derived_probe(const string& funcname, this->tok = q.base_probe->tok; + // XXX: hack for strange g++/gcc's +#ifndef USHRT_MAX +#define USHRT_MAX 32767 +#endif + // Range limit maxactive() value if (q.has_maxactive && (q.maxactive_val < 0 || q.maxactive_val > USHRT_MAX)) throw semantic_error ("maxactive value out of range [0," |