| 192 | } |
| 193 | |
| 194 | void * |
| 195 | Plugin::resolveSym(std::string const &sym) |
| 196 | { |
| 197 | void *addr; |
| 198 | std::string full_name = |
| 199 | STRINGIFY(SUSCAN_SYM_PFX) + sym; |
| 200 | |
| 201 | if (sym == SIGDIGGER_PLUGIN_MANGLED_ENTRY) |
| 202 | full_name = sym; |
| 203 | |
| 204 | addr = dlsym(this->m_handle, full_name.c_str()); |
| 205 | |
| 206 | if (addr == nullptr) { |
| 207 | SU_ERROR( |
| 208 | "%s: cannot resolve plugin symbol `%s'\n", |
| 209 | this->m_path.c_str(), |
| 210 | sym.c_str()); |
| 211 | return nullptr; |
| 212 | } |
| 213 | |
| 214 | return addr; |
| 215 | } |
| 216 | |
| 217 | Plugin::Plugin( |
| 218 | std::string const &name, |