diff options
author | Tony Puccinelli | 2010-08-16 16:32:06 +0000 |
---|---|---|
committer | Tony Puccinelli | 2010-08-16 16:32:06 +0000 |
commit | 8f7de9974f859ffa4841be015340af667e604168 (patch) | |
tree | 5868e84c710804a1cfe23c0cbe4b900da0ecad51 | |
parent | 8e199cf434e5e82725957b2cb28e9fc59565b869 (diff) | |
download | scummvm-rg350-8f7de9974f859ffa4841be015340af667e604168.tar.gz scummvm-rg350-8f7de9974f859ffa4841be015340af667e604168.tar.bz2 scummvm-rg350-8f7de9974f859ffa4841be015340af667e604168.zip |
Added doxygen comments for a few different plugin-related classes
svn-id: r52124
-rw-r--r-- | backends/plugins/elf-loader.h | 7 | ||||
-rw-r--r-- | backends/plugins/elf-provider.h | 9 | ||||
-rw-r--r-- | backends/plugins/shorts-segment-manager.h | 15 |
3 files changed, 28 insertions, 3 deletions
diff --git a/backends/plugins/elf-loader.h b/backends/plugins/elf-loader.h index 4b5ec99b57..df0427e429 100644 --- a/backends/plugins/elf-loader.h +++ b/backends/plugins/elf-loader.h @@ -32,6 +32,13 @@ #include "common/stream.h" #include "backends/plugins/dynamic-plugin.h" +/** + * DLObject + * + * Class that most directly handles operations on a plugin file + * (opening it for reading, loading/unloading it in memory, finding a specific symbol in the file, etc.) + * Subclasses have the same functionality, but implementations specific to different processors/platforms. + */ class DLObject { protected: void *_segment, *_symtab; diff --git a/backends/plugins/elf-provider.h b/backends/plugins/elf-provider.h index 61112e5b4e..200d4faf40 100644 --- a/backends/plugins/elf-provider.h +++ b/backends/plugins/elf-provider.h @@ -34,6 +34,15 @@ #include "backends/plugins/elf-loader.h" +/** + * ELFPlugin + * + * Objects of this class are returned when the PluginManager calls + * getPlugins() on an ELFPluginProvider. An intermediary class for + * dealing with plugin files, ELFPlugin is responsible for creating/destroying + * a DLObject that handles the opening/loading/unloading of the plugin file whose + * path in the target backend's file system is "_filename". + */ class ELFPlugin : public DynamicPlugin { protected: DLObject *_dlHandle; diff --git a/backends/plugins/shorts-segment-manager.h b/backends/plugins/shorts-segment-manager.h index caefc7da8c..2710a7b9ff 100644 --- a/backends/plugins/shorts-segment-manager.h +++ b/backends/plugins/shorts-segment-manager.h @@ -35,10 +35,19 @@ #define ShortsMan ShortSegmentManager::instance() /** - * Manages the segments of small data put in the gp-relative area for MIPS processors, - * and lets these segments be handled differently in the ELF loader. + * ShortSegmentManager + * + * Since MIPS is limited to 32 bits per instruction, loading data that's further away than 16 bits + * takes several instructions. Thus, small global data (which is likely to be accessed a lot from + * multiple locations) is often put into a GP-relative area (GP standing for the global pointer register) + * in MIPS processors. This class manages these segments of small global data, and is used by the + * member functions of MIPSDLObject, which query in information from this manager in order to deal with + * this segment during the loading/unloading of plugins. + * * Since there's no true dynamic linker to change the GP register between plugins and the main engine, - * custom linker scripts ensure the GP-area is in the same place for both. + * custom ld linker scripts for both the main executable and the plugins ensure the GP-area is in the + * same place for both. The ShortSegmentManager accesses this place via the symbols __plugin_hole_start + * and __plugin_hole_end, which are defined in those custom ld linker scripts. */ class ShortSegmentManager : public Common::Singleton<ShortSegmentManager> { private: |