From e016a49a83276fc061df86b1b4d72ec8c4efdd29 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 31 Dec 2008 14:41:29 -0500 Subject: build: make compatible with elfutils 0.138 too --- translate.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index cdc3da84..cce76db6 100644 --- a/translate.cxx +++ b/translate.cxx @@ -26,6 +26,9 @@ extern "C" { #include +#ifdef HAVE_ELFUTILS_VERSION_H +#include +#endif } using namespace std; @@ -4475,8 +4478,15 @@ dump_unwindsyms (Dwfl_Module *m, (const unsigned char **)&build_id_bits, &build_id_vaddr)) > 0) { - /* XXX: But see https://bugzilla.redhat.com/show_bug.cgi?id=465872; - dwfl_module_build_id was not intended to return the end address. */ + // Enable workaround for elfutils dwfl bug. + // 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) + // Let's standardize to the buggy "end of build-id bits" behavior. + build_id_vaddr += build_id_len; +#endif +#endif if (c->session.verbose > 1) { clog << "Found build-id in " << name << ", length " << build_id_len; -- cgit