diff options
author | Tony Puccinelli | 2010-08-07 00:40:15 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-07 00:40:15 +0000 |
commit | 6982aed8a43be6a33802be95c9fde557885b7a5b (patch) | |
tree | 5fe7161875e2e7ff6658c6179f9f9c03ef8adf90 /backends/plugins | |
parent | 646587f79a4249e25e47af74d36c72602f00dd0f (diff) | |
download | scummvm-rg350-6982aed8a43be6a33802be95c9fde557885b7a5b.tar.gz scummvm-rg350-6982aed8a43be6a33802be95c9fde557885b7a5b.tar.bz2 scummvm-rg350-6982aed8a43be6a33802be95c9fde557885b7a5b.zip |
made MIPSDLObject and PS2 plugin provider that uses it
svn-id: r51818
Diffstat (limited to 'backends/plugins')
-rw-r--r-- | backends/plugins/arm-loader.cpp | 6 | ||||
-rw-r--r-- | backends/plugins/ds/ds-provider.cpp | 6 | ||||
-rw-r--r-- | backends/plugins/mips-loader.cpp (renamed from backends/plugins/mips-relocs.cpp) | 9 |
3 files changed, 9 insertions, 12 deletions
diff --git a/backends/plugins/arm-loader.cpp b/backends/plugins/arm-loader.cpp index 61d7c73236..cb19af78b6 100644 --- a/backends/plugins/arm-loader.cpp +++ b/backends/plugins/arm-loader.cpp @@ -23,7 +23,7 @@ * */ -#if defined(DYNAMIC_MODULES) && defined(ARM) +#if defined(DYNAMIC_MODULES) #include "backends/fs/ds/ds-fs.h" #include "elf-loader.h" @@ -146,7 +146,7 @@ bool ARMDLObject::relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *e Elf32_Shdr *curShdr = &(shdr[i]); if ((curShdr->sh_type == SHT_REL || curShdr->sh_type == SHT_RELA) && // Check for a relocation section - curShdr->sh_entsize == sizeof(Elf32_Rel) && // Check for proper relocation size + curShdr->sh_entsize == sizeof(Elf32_Rel) && // Check for proper relocation size (int)curShdr->sh_link == _symtab_sect && // Check that the sh_link connects to our symbol table curShdr->sh_info < ehdr->e_shnum && // Check that the relocated section exists (shdr[curShdr->sh_info].sh_flags & SHF_ALLOC)) { // Check if relocated section resides in memory @@ -166,4 +166,4 @@ bool ARMDLObject::relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *e return true; } -#endif /* defined(DYNAMIC_MODULES) && defined(ARM) */ +#endif /* defined(DYNAMIC_MODULES) */ diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp index c83f198b5e..66e063f151 100644 --- a/backends/plugins/ds/ds-provider.cpp +++ b/backends/plugins/ds/ds-provider.cpp @@ -25,17 +25,11 @@ #if defined(DYNAMIC_MODULES) && defined(__DS__) -/*#include "base/plugins.h" -#include "backends/plugins/dynamic-plugin.h" -#include "common/fs.h" - -#include "backends/plugins/elf-loader.h"*/ #include "backends/plugins/arm-loader.h" #include "backends/plugins/elf-provider.h" #include "backends/plugins/ds/ds-provider.h" - class DSPlugin : public ELFPlugin { public: DSPlugin(const Common::String &filename) { diff --git a/backends/plugins/mips-relocs.cpp b/backends/plugins/mips-loader.cpp index fe8fa7c1a0..708456d475 100644 --- a/backends/plugins/mips-relocs.cpp +++ b/backends/plugins/mips-loader.cpp @@ -23,7 +23,9 @@ * */ -#include "elf-loader.h" +#if defined(DYNAMIC_MODULES) + +#include "mips-loader.h" #define __DEBUG_PLUGINS__ @@ -44,7 +46,7 @@ * @param relSegment Base address of relocated segment in memory (memory offset) * */ -bool DLObject::relocate(Common::SeekableReadStream* DLFile, unsigned long offset, unsigned long size, void *relSegment) { +bool MIPSDLObject::relocate(Common::SeekableReadStream* DLFile, unsigned long offset, unsigned long size, void *relSegment) { Elf32_Rel *rel = NULL; // relocation entry // Allocate memory for relocation table @@ -228,7 +230,7 @@ bool DLObject::relocate(Common::SeekableReadStream* DLFile, unsigned long offset return true; } -bool DLObject::relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) { +bool MIPSDLObject::relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) { // Loop over sections, finding relocation sections for (int i = 0; i < ehdr->e_shnum; i++) { @@ -257,3 +259,4 @@ bool DLObject::relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *ehdr return true; } +#endif /* defined(DYNAMIC_MODULES) */ |