Browse Source

Force extension loaders to be linked in

mvp
Andrew Waterman 12 years ago
parent
commit
9a9df0230f
  1. 6
      riscv/extension.cc
  2. 10
      spike/extensions.cc

6
riscv/extension.cc

@ -1,12 +1,6 @@
#include "extension.h"
#include "trap.h"
std::map<std::string, std::function<extension_t*()>>& extensions()
{
static std::map<std::string, std::function<extension_t*()>> v;
return v;
}
extension_t::~extension_t()
{
}

10
spike/extensions.cc

@ -1 +1,11 @@
#include "extension.h"
#include "hwacha.h"
#include "dummy-rocc.h"
// Static constructors want to make use of the extensions map, so we
// access it through a function call to guarantee initialization order.
std::map<std::string, std::function<extension_t*()>>& extensions()
{
static std::map<std::string, std::function<extension_t*()>> v;
return v;
}

Loading…
Cancel
Save