PLUGINS: Cleanup.

- Unify ELF loader handling in configure
- Rename ELF_LOADER_TARGET to USE_ELF_LOADER

svn-id: r52728
This commit is contained in:
Andre Heider 2010-09-15 07:43:16 +00:00
parent fd4189180d
commit 41834499ed
18 changed files with 110 additions and 98 deletions

View file

@ -23,9 +23,10 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ARM_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET)
#include "backends/plugins/elf/elf-loader.h"
#include "backends/plugins/elf/arm-loader.h"
#include "common/debug.h"
@ -128,5 +129,5 @@ bool ARMDLObject::relocateRels(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
return true;
}
#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */

View file

@ -23,11 +23,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ARM_TARGET)
#ifndef BACKENDS_PLUGINS_ARM_LOADER_H
#define BACKENDS_PLUGINS_ARM_LOADER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET)
#include "backends/plugins/elf/elf-loader.h"
class ARMDLObject : public DLObject {
@ -41,6 +43,7 @@ public:
}
};
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(ARM_TARGET) */
#endif /* BACKENDS_PLUGINS_ARM_LOADER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(ARM_TARGET) */

View file

@ -23,7 +23,9 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#include "backends/plugins/elf/elf-loader.h"
@ -423,5 +425,5 @@ void *DLObject::symbol(const char *name) {
return 0;
}
#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */

View file

@ -23,11 +23,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#ifndef BACKENDS_PLUGINS_ELF_LOADER_H
#define BACKENDS_PLUGINS_ELF_LOADER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#include <stddef.h>
#include "backends/plugins/elf/elf32.h"
@ -96,7 +98,7 @@ public:
void discard_symtab();
};
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
#endif /* BACKENDS_PLUGINS_ELF_LOADER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET) */

View file

@ -23,7 +23,9 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#ifdef ELF_LOADER_CXA_ATEXIT
#include <cxxabi.h>
@ -158,4 +160,5 @@ bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const {
return true;
}
#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)

View file

@ -23,11 +23,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)
#ifndef BACKENDS_PLUGINS_ELF_PROVIDER_H
#define BACKENDS_PLUGINS_ELF_PROVIDER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#include "backends/plugins/elf/elf-loader.h"
#include "common/fs.h"
@ -74,6 +76,7 @@ protected:
bool isPluginFilename(const Common::FSNode &node) const;
};
#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#endif /* BACKENDS_PLUGINS_ELF_PROVIDER_H */
#endif // defined(DYNAMIC_MODULES) && defined(ELF_LOADER_TARGET)

View file

@ -28,6 +28,8 @@
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
/**
* ELF stuff:
* The contents of this file were gathered mainly from the SYSTEM V APPLICATION BINARY INTERFACE.
@ -250,5 +252,7 @@ typedef struct {
__valgp; \
}
#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#endif /* BACKENDS_ELF_H */

View file

@ -23,7 +23,9 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
#include "backends/plugins/elf/mips-loader.h"
@ -331,5 +333,5 @@ void MIPSDLObject::unload() {
}
}
#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */

View file

@ -24,11 +24,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
#ifndef BACKENDS_PLUGINS_MIPS_LOADER_H
#define BACKENDS_PLUGINS_MIPS_LOADER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
#include "backends/plugins/elf/elf-loader.h"
#include "backends/plugins/elf/shorts-segment-manager.h"
@ -51,7 +53,7 @@ public:
}
};
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET) */
#endif /* BACKENDS_PLUGINS_MIPS_LOADER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */

View file

@ -23,7 +23,9 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(PPC_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET)
#include "backends/plugins/elf/elf-loader.h"
#include "backends/plugins/elf/ppc-loader.h"
@ -123,5 +125,5 @@ bool PPCDLObject::relocateRels(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
return true;
}
#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */

View file

@ -23,11 +23,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(PPC_TARGET)
#ifndef BACKENDS_PLUGINS_PPC_LOADER_H
#define BACKENDS_PLUGINS_PPC_LOADER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET)
#include "backends/plugins/elf/elf-loader.h"
class PPCDLObject : public DLObject {
@ -41,7 +43,7 @@ public:
}
};
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(PPC_TARGET) */
#endif /* BACKENDS_PLUGINS_PPC_LOADER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(PPC_TARGET) */

View file

@ -23,7 +23,9 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
#include "backends/plugins/elf/shorts-segment-manager.h"
@ -82,5 +84,6 @@ void ShortSegmentManager::deleteSegment(ShortSegmentManager::Segment *seg) {
delete seg;
}
#endif /* DYNAMIC_MODULES && MIPS_TARGET */
#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)

View file

@ -23,11 +23,13 @@
*
*/
#if defined(DYNAMIC_MODULES) && defined(MIPS_TARGET)
#ifndef SHORTS_SEGMENT_MANAGER_H
#define SHORTS_SEGMENT_MANAGER_H
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
#include "backends/plugins/elf/elf32.h"
#include "common/singleton.h"
@ -109,7 +111,7 @@ private:
char *_highestAddress;
};
#endif // defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) && defined(MIPS_TARGET)
#endif /* SHORTS_SEGMENT_MANAGER_H */
#endif /* defined(DYNAMIC_MODULES) && defined(MIPS_TARGET) */