Pass further main program data through the indirect entry information.

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 -
This commit is contained in:
svenbarth 2016-01-29 16:51:27 +00:00
parent 0491bca72a
commit 7b67ead440
3 changed files with 28 additions and 0 deletions

View File

@ -604,6 +604,12 @@ type
TEntryInformation = record
InitFinalTable : Pointer;
ThreadvarTablesTable : Pointer;
ResourceStringTables : Pointer;
ResStrInitTables : Pointer;
{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
WideInitTables : Pointer;
{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
ResLocation : Pointer;
PascalMain : Procedure;
valgrind_used : boolean;
{$ifdef HAS_ENTRYINFORMATION_OS}

View File

@ -540,6 +540,12 @@ type
TEntryInformation = record
InitFinalTable : Pointer;
ThreadvarTablesTable : Pointer;
ResourceStringTables : Pointer;
ResStrInitTables : Pointer;
{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
WideInitTables : Pointer;
{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
ResLocation : Pointer;
PascalMain : Procedure;
valgrind_used : boolean;
{$ifdef HAS_ENTRYINFORMATION_OS}

View File

@ -19,6 +19,11 @@
InitFinalTable : record end; external name 'INITFINAL';
ThreadvarTablesTable : record end; external name 'FPC_THREADVARTABLES';
WideInitTables : record end; external name 'FPC_WIDEINITTABLES';
{$ifdef FPC_HAS_RESSTRINITS}
ResStrInitTables : record end; external name 'FPC_RESSTRINITTABLES';
{$endif FPC_HAS_RESSTRINITS}
ResourceStringTables : record end; external name 'FPC_RESOURCESTRINGTABLES';
valgrind_used : boolean;external name '__fpc_valgrind';
{$if defined(FPC_USE_TLS_DIRECTORY) or defined(FPC_SECTION_THREADVARS)}
@ -48,6 +53,14 @@
SysInitEntryInformation : TEntryInformation = (
InitFinalTable : @InitFinalTable;
ThreadvarTablesTable : @ThreadvarTablesTable;
ResourceStringTables : @ResourceStringTables;
{$ifdef FPC_HAS_RESSTRINITS}
ResStrInitTables : @ResStrInitTables;
{$else FPC_HAS_RESSTRINITS}
ResStrInitTables : nil;
{$endif FPC_HAS_RESSTRINITS}
WideInitTables : @WideInitTables;
ResLocation : nil;
PascalMain : @PascalMain;
valgrind_used : false;
OS : (
@ -61,6 +74,9 @@
{ valgind_used is the only thng that can change at startup
EntryInformation.InitFinalTable:=@InitFinalTable;
EntryInformation.ThreadvarTablesTable:=@ThreadvarTablesTable;
EntryInformation.ResourceStringTables:=@ResourceStringTables;
EntryInformation.ResStrInitTables:=@ResStrInitTables;
EntryInformation.WideInitTables:=@WideInitTables;
EntryInformation.OS.asm_exit:=@asm_exit;
EntryInformation.PascalMain:=@PascalMain;}
SysInitEntryInformation.valgrind_used:=valgrind_used;