rtl/inc/systemh.inc & rtl/java/jsystemh_types.inc:
- TEntryInformation: remove WideInitTables
rtl/win/sysosh.inc:
+ TEntyrInformationOS: add WideInitTables
rtl/win/syswin.inc:
* adjust WStrInitTablesTable, so that it is now a pointer and can be used both with direct and indirect main entry
* InitWin32Widestrings: WStrInitTablesTable is now a pointer
rtl/win32/sysinit.inc:
* WideInitTables has moved to the OS specific part of the entry information
rtl/win32/system.pp:
* OsSetupEntryinformation: setup WStrInitTablesTable
git-svn-id: trunk@33571 -
win/sysosh.inc, TEntryInformationOS:
+ new field SysInstance that will hold the address to the main program's SysInstance variable
win32/system.pp:
* rename SysInstance to FPCSysInstance and make it a PLongInt
* OsSetupEntryInformation: setup FPCSysInstance
* adjust initialization of SysInstance to use FPCSysInstance instead
win32/sysinit.inc:
* SysInstance is no longer an external
* initialize the OS.SysInstance field of EntryInformation
win64/system.pp:
* add a FPCSysInstance that's a pointer to SysInstance
win/winres.inc:
* SysInstance is now a pointer and has the same name on both Win32 and Win64
git-svn-id: trunk@33107 -
rtl/inc/system.inc:
* SetupEntryInformation: call new, optional function OSSetupEntryInformation to handle platform specific entry information initialization
rtl/win/sysosh.inc, TEntryInformationOS:
+ new field TlsKeyAddr which will hold the address to the main binary's TlsKey variable
win32/sysinit.inc:
+ provide the variable holding the TlsKey and pass that on to the entry information record
win32/system.pp:
+ new OS specific entry information initialization (currently only the TlsKey)
win/systhrd.inc:
* declare TlsKey as a pointer to a DWord value instead of a DWord; on non-indirect entry platforms this is initialized with the address of new variable TlsKeyVar, on indirect entry platforms it will be initialized by the entry information initialization
* adjust usages of TlsKey from DWord to PDWord
win/systlsdir.inc:
* TlsKey is now a PDWord and (in sysinit) points to TlsKeyVar
win/syswin.inc:
* adjust TlsKey usage
inc/heaptrc.pp:
* TlsKey is now a PDWord, thus adjust the import and the usage
git-svn-id: trunk@33091 -
rtl/inc/system.inc:
+ new variables that hold pointers to the tables
+ new procedure SetupEntryInformation() that should be used in the entry points of indirect entry targets to setup cross target fields
+ for direct entry targets the two resource string tables are imported here and supplied as initialization to the table pointers
objpas/objpas.pp:
* adjust table declarations so that the pointers provided from the System unit are used
* adjust usages of the tables as they are now pointers
win32/system.pp:
* Exe_Entry: use SetupEntryInformation()
win/syswin.inc:
* Dll_Entry: use SetupEntryInformation()
git-svn-id: trunk@33028 -
rtl/inc/systemh.inc:
+ TEntryInformation: add Pointer fields ResourceStringTables, ResStrInitTables, WideInitTables (for targets with separate WideString type) and ResLocation (not used on Windows, but since most other targets don't have Windows' resource system it's not part of OS)
rtl/java/jsystemh_types.inc:
+ TEntryInformation: adjust for consistency reasons
rtl/win32/sysinit.inc:
* SysInitEntryInformation: initialize with pointers to the correct tables
git-svn-id: trunk@33027 -
+ add (uninitialized) global variable EntryInformation for systems that use indirect main information
win32/system.pp:
- remove initialized EntryInformation and instead rely on the one passed by the sysinit* units
git-svn-id: trunk@33026 -
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.
+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System
git-svn-id: trunk@29613 -