got rid of gp2xwiz loader (anything useful from it is already incorporated into the ARM loader in the plugins directory at this point) and implemented ARMDLObject as a subtype of DLObject

svn-id: r51813
This commit is contained in:
Tony Puccinelli 2010-08-06 23:30:27 +00:00
parent 66225374b2
commit 646587f79a
11 changed files with 22 additions and 1004 deletions

View file

@ -23,14 +23,14 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#include "backends/plugins/elf-provider.h"
#include "backends/plugins/dynamic-plugin.h"
#include "common/fs.h"
#include "backends/plugins/elf-loader.h"
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) {
void *func;
bool handleNull;
@ -58,30 +58,6 @@ DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) {
return tmp;
}
bool ELFPlugin::loadPlugin() {
assert(!_dlHandle);
DLObject *obj = new DLObject(NULL);
if (obj->open(_filename.c_str())) {
_dlHandle = obj;
} else {
delete obj;
_dlHandle = NULL;
}
if (!_dlHandle) {
warning("Failed loading plugin '%s'", _filename.c_str());
return false;
}
bool ret = DynamicPlugin::loadPlugin();
if (ret && _dlHandle) {
_dlHandle->discard_symtab();
}
return ret;
}
void ELFPlugin::unloadPlugin() {
DynamicPlugin::unloadPlugin();
if (_dlHandle) {
@ -93,11 +69,6 @@ void ELFPlugin::unloadPlugin() {
}
}
Plugin* ELFPluginProvider::createPlugin(const Common::FSNode &node) const {
return new ELFPlugin(node.getPath());
}
bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();