fix: static class member MAX_DATA_ENTRIES is not defined -> linker error

Static class members usually have to be defined explicitly which plays not
well with header only libraries. Moving the constant into the ELFIO scope
works around that problem.

The problem only shows up at -O0. Higher optimisations levels manage to
completely remove the references to the static member.
This commit is contained in:
Mario Werner 2014-11-13 18:23:02 +01:00
parent c655d9bbca
commit 22bd7ba77d

View File

@ -413,6 +413,7 @@ static struct dynamic_tag_t {
{ DT_MAXPOSTAGS , "MAXPOSTAGS" },
};
static const ELFIO::Elf_Xword MAX_DATA_ENTRIES = 64;
//------------------------------------------------------------------------------
class dump
@ -425,8 +426,6 @@ class dump
std::hex << std::left
public:
static const ELFIO::Elf_Xword MAX_DATA_ENTRIES = 64;
//------------------------------------------------------------------------------
static void
header( std::ostream& out, const elfio& reader )