Browse Source

+ added constructor to TNewExeResidentNameTableEntry that allows you to
initialize this entry's ordinal number

git-svn-id: trunk@42606 -

nickysn 6 years ago
parent
commit
251a93456e
1 changed files with 13 additions and 1 deletions
  1. 13 1
      compiler/ogomf.pas

+ 13 - 1
compiler/ogomf.pas

@@ -492,6 +492,8 @@ interface
       private
         FOrdinalNr: Word;
       public
+        constructor Create(HashObjectList:TFPHashObjectList;const s:TSymStr;OrdNr:Word);
+
         property OrdinalNr: Word read FOrdinalNr write FOrdinalNr;
       end;
 
@@ -3684,6 +3686,16 @@ cleanup:
         WriteEndNames;
       end;
 
+{****************************************************************************
+                       TNewExeResidentNameTableEntry
+****************************************************************************}
+
+    constructor TNewExeResidentNameTableEntry.Create(HashObjectList:TFPHashObjectList;const s:TSymStr;OrdNr:Word);
+      begin
+        inherited Create(HashObjectList,s);
+        OrdinalNr:=OrdNr;
+      end;
+
 {****************************************************************************
                          TNewExeResidentNameTable
 ****************************************************************************}
@@ -3859,7 +3871,7 @@ cleanup:
         i: Integer;
       begin
         { the first entry in the resident-name table is the module name }
-        TNewExeResidentNameTableEntry.Create(ResidentNameTable,ExtractModuleName(current_module.exefilename));
+        TNewExeResidentNameTableEntry.Create(ResidentNameTable,ExtractModuleName(current_module.exefilename),0);
 
         Header.InitialIP:=EntrySym.address;
         Header.InitialCS:=TNewExeSection(EntrySym.objsection.ExeSection).MemBasePos;