Browse Source

* fixed the "Incompatible section options" error when using the omf internal linker to produce msdos executables

git-svn-id: trunk@31347 -
nickysn 10 years ago
parent
commit
07fff73527
1 changed files with 19 additions and 0 deletions
  1. 19 0
      compiler/ogomf.pas

+ 19 - 0
compiler/ogomf.pas

@@ -195,6 +195,13 @@ interface
         property OverlayNumber: Word read FOverlayNumber write FOverlayNumber;
       end;
 
+      { TMZExeSection }
+
+      TMZExeSection=class(TExeSection)
+      public
+        procedure AddObjSection(objsec:TObjSection;ignoreprops:boolean=false);override;
+      end;
+
       { TMZExeOutput }
 
       TMZExeOutput = class(TExeOutput)
@@ -1638,6 +1645,17 @@ implementation
         aWriter.WriteZeros(HeaderSizeInBytes-aWriter.Size);
       end;
 
+{****************************************************************************
+                               TMZExeSection
+****************************************************************************}
+
+    procedure TMZExeSection.AddObjSection(objsec: TObjSection; ignoreprops: boolean);
+      begin
+        { allow mixing initialized and uninitialized data in the same section
+          => set ignoreprops=true }
+        inherited AddObjSection(objsec,true);
+      end;
+
 {****************************************************************************
                                TMZExeOutput
 ****************************************************************************}
@@ -1657,6 +1675,7 @@ implementation
     constructor TMZExeOutput.create;
       begin
         inherited create;
+        CExeSection:=TMZExeSection;
         CObjData:=TOmfObjData;
       end;