model/dlm-loader-factory.cc
changeset 669 cb779a3844be
parent 578 71461e470024
child 678 8c9aece65bf9
equal deleted inserted replaced
668:06b23f4d262c 669:cb779a3844be
    89 void *
    89 void *
    90 DlmLoader::Load (std::string filename, int flag)
    90 DlmLoader::Load (std::string filename, int flag)
    91 {
    91 {
    92   NS_LOG_FUNCTION (this << filename << flag);
    92   NS_LOG_FUNCTION (this << filename << flag);
    93   void *module = dlmopen (m_lmid, filename.c_str (), flag);
    93   void *module = dlmopen (m_lmid, filename.c_str (), flag);
       
    94   if (!module)
       
    95     {
       
    96       NS_LOG_UNCOND ("*** unable to open non-shared object file=" << filename << " ***");
       
    97       NS_LOG_UNCOND ("dlerror() = " << dlerror ());
       
    98       NS_ASSERT_MSG (false, "make it sure that DCE binrary file " << filename 
       
    99                      << " was built with correct options: (CFLAGS=-fPIC, LDFLAGS=-pie -rdynamic)");
       
   100     }
    94   m_loaded.push_back (module);
   101   m_loaded.push_back (module);
    95   return module;
   102   return module;
    96 }
   103 }
    97 void
   104 void
    98 DlmLoader::Unload (void *module)
   105 DlmLoader::Unload (void *module)