diff options
author | Josh Stone <jistone@redhat.com> | 2009-08-10 13:01:30 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-08-10 13:01:30 -0700 |
commit | 6a38401c78a02b9bd14e50966ecdd54a003597b7 (patch) | |
tree | 756865ad341d322f3e47bae5d398ebb23ba48209 /translate.cxx | |
parent | 23d106b9c554c2b32dfb8c94dc963834f65ef7df (diff) | |
download | systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.tar.gz systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.tar.xz systemtap-steved-6a38401c78a02b9bd14e50966ecdd54a003597b7.zip |
Simplify _ELFUTILS_PREREQ checking
We were jumping through a few hoops to deal with elfutils < 0.138 that
did not have the _ELFUTILS_PREREQ macro. I've added an always-false
dummy macro to take its place when it doesn't exit. All of the other
"#ifdef _ELFUTILS_PREREQ" ugliness can now go away.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/translate.cxx b/translate.cxx index 1ddc1778..b8e22e49 100644 --- a/translate.cxx +++ b/translate.cxx @@ -26,9 +26,6 @@ extern "C" { #include <elfutils/libdwfl.h> -#ifdef HAVE_ELFUTILS_VERSION_H -#include <elfutils/version.h> -#endif } using namespace std; @@ -4545,22 +4542,15 @@ dump_unwindsyms (Dwfl_Module *m, // 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) +#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 !_ELFUTILS_PREREQ(0,141) if (build_id_vaddr < base && dwfl_module_relocations (m) == 1) { GElf_Addr main_bias; |