diff options
author | Tony Puccinelli | 2010-07-26 00:41:31 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-07-26 00:41:31 +0000 |
commit | 4e530debd2b2cb79078b705792fc599d328d6c7c (patch) | |
tree | fd26aeb28a9d95d6a83c960fdca88dd80f4adde2 /backends/plugins | |
parent | 95f66e6fb280a65702fdb932827f89d2c63b0cda (diff) | |
download | scummvm-rg350-4e530debd2b2cb79078b705792fc599d328d6c7c.tar.gz scummvm-rg350-4e530debd2b2cb79078b705792fc599d328d6c7c.tar.bz2 scummvm-rg350-4e530debd2b2cb79078b705792fc599d328d6c7c.zip |
moved flushDataCache function from ds-loader.cpp to elf-loader.cpp and moved arm-relocations from ds-loader.cpp to arm-relocs.cpp; deleted ds-loader.cpp
svn-id: r51289
Diffstat (limited to 'backends/plugins')
-rw-r--r-- | backends/plugins/arm-relocs.cpp (renamed from backends/plugins/ds/ds-loader.cpp) | 11 | ||||
-rw-r--r-- | backends/plugins/elf-loader.cpp | 14 |
2 files changed, 16 insertions, 9 deletions
diff --git a/backends/plugins/ds/ds-loader.cpp b/backends/plugins/arm-relocs.cpp index 7dd27cfb4a..66e466a58a 100644 --- a/backends/plugins/ds/ds-loader.cpp +++ b/backends/plugins/arm-relocs.cpp @@ -24,7 +24,7 @@ */ #include "backends/fs/ds/ds-fs.h" -#include "../elf-loader.h" +#include "elf-loader.h" #include "dsmain.h" #define __DEBUG_PLUGINS__ @@ -38,13 +38,6 @@ #define seterror(x,...) consolePrintf(x, ## __VA_ARGS__) /** - * Flushes the data cache. - */ -void flushDataCache() { - DC_FlushAll(); -} - -/** * Follow the instruction of a relocation section. * * @param DLFile SeekableReadStream of File @@ -52,7 +45,7 @@ void flushDataCache() { * @param size Size of relocation section * */ -bool dlRelocate(Common::SeekableReadStream* DLFile, unsigned long offset, unsigned long size, void *relSegment) { +bool DLObject::relocate(Common::SeekableReadStream* DLFile, unsigned long offset, unsigned long size, void *relSegment) { Elf32_Rel *rel = NULL; //relocation entry // Allocate memory for relocation table diff --git a/backends/plugins/elf-loader.cpp b/backends/plugins/elf-loader.cpp index f675386df9..685d22e28a 100644 --- a/backends/plugins/elf-loader.cpp +++ b/backends/plugins/elf-loader.cpp @@ -48,6 +48,20 @@ #define seterror(x,...) printf(x, ## __VA_ARGS__) +/** + * Flushes the data cache. + */ +void flushDataCache() { +#ifdef __DS__ + DC_FlushAll(); +#endif +#ifdef __PLAYSTATION2__ + FlushCache(0); + FlushCache(2); +#endif +} + + // Expel the symbol table from memory void DLObject::discard_symtab() { free(_symtab); |