aboutsummaryrefslogtreecommitdiff
path: root/backends/plugins/elf/elf-loader.h
diff options
context:
space:
mode:
authorAndre Heider2010-09-05 12:52:17 +0000
committerAndre Heider2010-09-05 12:52:17 +0000
commitc4a88559a5577e816793b02a6eaaa3ab69c8ecdb (patch)
tree2ac2f6abc8d4c5e584bccf283582273bfad2791e /backends/plugins/elf/elf-loader.h
parent86f4dbd956fa2b6622ceb8748427700373a1aceb (diff)
downloadscummvm-rg350-c4a88559a5577e816793b02a6eaaa3ab69c8ecdb.tar.gz
scummvm-rg350-c4a88559a5577e816793b02a6eaaa3ab69c8ecdb.tar.bz2
scummvm-rg350-c4a88559a5577e816793b02a6eaaa3ab69c8ecdb.zip
PLUGINS: Move platform specific code out of the generic ELF loader.
Instead overwrite pure virtual functions in a backend specific class. svn-id: r52556
Diffstat (limited to 'backends/plugins/elf/elf-loader.h')
-rw-r--r--backends/plugins/elf/elf-loader.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/plugins/elf/elf-loader.h b/backends/plugins/elf/elf-loader.h
index 6413c46cea..7c1d0830f3 100644
--- a/backends/plugins/elf/elf-loader.h
+++ b/backends/plugins/elf/elf-loader.h
@@ -25,8 +25,8 @@
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
-#ifndef ELF_LOADER_H
-#define ELF_LOADER_H
+#ifndef BACKENDS_PLUGINS_ELF_LOADER_H
+#define BACKENDS_PLUGINS_ELF_LOADER_H
#include <stddef.h>
@@ -65,9 +65,14 @@ protected:
bool loadStringTable(Common::SeekableReadStream* DLFile, Elf32_Shdr *shdr);
virtual void relocateSymbols(ptrdiff_t offset);
+ // architecture specific
virtual bool relocate(Common::SeekableReadStream* DLFile, unsigned long offset, unsigned long size, void *relSegment) = 0;
virtual bool relocateRels(Common::SeekableReadStream* DLFile, Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) = 0;
+ // platform specific
+ virtual void *allocSegment(size_t boundary, size_t size) const = 0;
+ virtual void freeSegment(void *segment) const = 0;
+ virtual void flushDataCache(void *ptr, uint32 len) const = 0;
public:
DLObject();
virtual ~DLObject();
@@ -78,6 +83,6 @@ public:
void discard_symtab();
};
-#endif /* ELF_LOADER_H */
+#endif /* BACKENDS_PLUGINS_ELF_LOADER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */