- eliminate dependency on linking order for autosegs registration
This commit is contained in:
parent
013078a02f
commit
18b5928f49
14 changed files with 218 additions and 235 deletions
|
|
@ -41,6 +41,7 @@
|
|||
#include "name.h"
|
||||
#include "palentry.h"
|
||||
#include "textureid.h"
|
||||
#include "autosegs.h"
|
||||
|
||||
class PClass;
|
||||
class PType;
|
||||
|
|
@ -134,8 +135,8 @@ public: \
|
|||
static const size_t PointerOffsets[];
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma section(".creg$u",read)
|
||||
# define _DECLARE_TI(cls) __declspec(allocate(".creg$u")) ClassReg * const cls::RegistrationInfoPtr = &cls::RegistrationInfo;
|
||||
# pragma section(SECTION_CREG,read)
|
||||
# define _DECLARE_TI(cls) __declspec(allocate(SECTION_CREG)) ClassReg * const cls::RegistrationInfoPtr = &cls::RegistrationInfo;
|
||||
#else
|
||||
# define _DECLARE_TI(cls) ClassReg * const cls::RegistrationInfoPtr __attribute__((section(SECTION_CREG))) = &cls::RegistrationInfo;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue