summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-03-16 12:15:51 -0400
committerDave Brolley <brolley@redhat.com>2009-03-16 12:15:51 -0400
commit9b6d8bd0d7a6f80a613b7c609ff1d71ddfed009b (patch)
tree2a84a12198ad719d566dd4bca8494a9824c2a097 /translate.cxx
parent24068a1f2e17857f4ce096a17244d09575a199c1 (diff)
parent5d369d06fa39e4769fb3364ba29f588f3d995c24 (diff)
downloadsystemtap-steved-9b6d8bd0d7a6f80a613b7c609ff1d71ddfed009b.tar.gz
systemtap-steved-9b6d8bd0d7a6f80a613b7c609ff1d71ddfed009b.tar.xz
systemtap-steved-9b6d8bd0d7a6f80a613b7c609ff1d71ddfed009b.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx32
1 files changed, 25 insertions, 7 deletions
diff --git a/translate.cxx b/translate.cxx
index 17c37dc3..f4c28536 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4497,17 +4497,35 @@ dump_unwindsyms (Dwfl_Module *m,
// see https://bugzilla.redhat.com/show_bug.cgi?id=465872
// and http://sourceware.org/ml/systemtap/2008-q4/msg00579.html
#ifdef _ELFUTILS_PREREQ
-#if _ELFUTILS_PREREQ(0,138)
+ #if _ELFUTILS_PREREQ(0,138)
// Let's standardize to the buggy "end of build-id bits" behavior.
build_id_vaddr += build_id_len;
+ #endif
+ #if !_ELFUTILS_PREREQ(0,141)
+ #define NEED_ELFUTILS_BUILDID_WORKAROUND
+ #endif
+#else
+ #define NEED_ELFUTILS_BUILDID_WORKAROUND
#endif
+
+ // And check for another workaround needed.
+ // see https://bugzilla.redhat.com/show_bug.cgi?id=489439
+ // and http://sourceware.org/ml/systemtap/2009-q1/msg00513.html
+#ifdef NEED_ELFUTILS_BUILDID_WORKAROUND
+ if (build_id_vaddr < base && dwfl_module_relocations (m) == 1)
+ {
+ GElf_Addr main_bias;
+ dwfl_module_getelf (m, &main_bias);
+ build_id_vaddr += main_bias;
+ }
#endif
- if (c->session.verbose > 1) {
- clog << "Found build-id in " << name
- << ", length " << build_id_len;
- clog << ", end at 0x" << hex << build_id_vaddr
- << dec << endl;
- }
+ if (c->session.verbose > 1)
+ {
+ clog << "Found build-id in " << name
+ << ", length " << build_id_len;
+ clog << ", end at 0x" << hex << build_id_vaddr
+ << dec << endl;
+ }
}
// Look up the relocation basis for symbols