summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeniy Meshcheryakov <eugen@debian.org>2009-12-15 14:17:51 +0100
committerEugeniy Meshcheryakov <eugen@debian.org>2009-12-15 14:17:51 +0100
commit66f65c4fb0ddcdf8a85a29662a23a546cfd5dffe (patch)
tree6aaf5e5744021c15f1e7876f34d7fe7eb759db29
parent958c58e8231563e9349e4d8ea56c04c25e1501c0 (diff)
downloadsystemtap-steved-66f65c4fb0ddcdf8a85a29662a23a546cfd5dffe.tar.gz
systemtap-steved-66f65c4fb0ddcdf8a85a29662a23a546cfd5dffe.tar.xz
systemtap-steved-66f65c4fb0ddcdf8a85a29662a23a546cfd5dffe.zip
Don't save build-id if it is located before _stext
This probably means that build-id will not be loaded at all and happens for example with ARM kernel. See also: http://sources.redhat.com/ml/systemtap/2009-q4/msg00574.html
-rw-r--r--translate.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx
index 4b006159..aca0d868 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4909,7 +4909,14 @@ dump_unwindsyms (Dwfl_Module *m,
c->output << ".num_sections = sizeof(_stp_module_" << stpmod_idx << "_sections)/"
<< "sizeof(struct _stp_section),\n";
- if (build_id_len > 0) {
+ /* Don't save build-id if it is located before _stext.
+ * This probably means that build-id will not be loaded at all and
+ * happens for example with ARM kernel.
+ *
+ * See also:
+ * http://sources.redhat.com/ml/systemtap/2009-q4/msg00574.html
+ */
+ if (build_id_len > 0 && (build_id_vaddr > base + extra_offset)) {
c->output << ".build_id_bits = \"" ;
for (int j=0; j<build_id_len;j++)
c->output << "\\x" << hex