Browse Source

Prepare Linux sysinit units for indirect main information.

rtl/linux/si_impl.inc:
  + add SysEntry external
  + add externals for the various tables
  + add default constant for the entry information; the entry points only need to fill in the platform specific type then

git-svn-id: branches/svenbarth/packages@32487 -
svenbarth 9 years ago
parent
commit
507375bef3
1 changed files with 40 additions and 0 deletions
  1. 40 0
      rtl/linux/si_impl.inc

+ 40 - 0
rtl/linux/si_impl.inc

@@ -13,3 +13,43 @@
  **********************************************************************}
  **********************************************************************}
 
 
 procedure PascalMain; external name 'PASCALMAIN';
 procedure PascalMain; external name 'PASCALMAIN';
+
+{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
+procedure SysEntry(constref info: TEntryInformation); external name 'FPC_SysEntry';
+
+var
+  InitFinalTable : record end; external name 'INITFINAL';
+  ThreadvarTablesTable : record end; external name 'FPC_THREADVARTABLES';
+  {$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
+  WideInitTables : record end; external name 'FPC_WIDEINITTABLES';
+  {$endif}
+  {$ifdef FPC_HAS_RESSTRINITS}
+  ResStrInitTables : record end; external name 'FPC_RESSTRINITTABLES';
+  {$endif}
+  ResourceStringTables : record end; external name 'FPC_RESOURCESTRINGTABLES';
+
+const
+  SysInitEntryInformation : TEntryInformation = (
+    InitFinalTable : @InitFinalTable;
+    ThreadvarTablesTable : @ThreadvarTablesTable;
+    ResourceStringTables : @ResourceStringTables;
+{$ifdef FPC_HAS_RESSTRINITS}
+    ResStrInitTables : @ResStrInitTables;
+{$else}
+    ResStrInitTables : nil;
+{$endif}
+{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
+    WideInitTables : @WideInitTables;
+{$endif}
+    asm_exit : nil;
+    PascalMain : @PascalMain;
+    valgrind_used : false;
+    Platform: (
+        argc: 0;
+        argv: nil;
+        envp: nil;
+        stkptr: nil;
+        haltproc: nil;
+      );
+    );
+{$endif}