Browse Source

* fixed the reading of OMF groups by the internal linker. Previously, it only
worked, when the files had only one group, called 'DGROUP'.

git-svn-id: trunk@39279 -

nickysn 7 years ago
parent
commit
f036e67d8f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/ogomf.pas

+ 5 - 0
compiler/ogomf.pas

@@ -2005,6 +2005,11 @@ implementation
         InputFileName:=AReader.FileName;
         InputFileName:=AReader.FileName;
         objdata:=CObjData.Create(InputFileName);
         objdata:=CObjData.Create(InputFileName);
         result:=false;
         result:=false;
+        { the TOmfObjData constructor creates a group 'DGROUP', which is to be
+          used by the code generator, when writing files. When reading object
+          files, however, we need to start with an empty list of groups, so
+          let's clear the group list now. }
+        objdata.GroupsList.Clear;
         LNames.Clear;
         LNames.Clear;
         ExtDefs.Clear;
         ExtDefs.Clear;
         FRawRecord.ReadFrom(FReader);
         FRawRecord.ReadFrom(FReader);