Browse Source

* override MemPos_Start for the NewExe exe output and perform the whole MemPos
stage inside of it, because the linker script contains only dummy section
names and thus none of the sections get their MemPos set, while using the
default implementation

git-svn-id: trunk@42562 -

nickysn 6 years ago
parent
commit
30e7406be3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      compiler/ogomf.pas

+ 10 - 0
compiler/ogomf.pas

@@ -528,6 +528,7 @@ interface
         procedure Order_ExeSection(const aname:string);override;
         procedure Order_EndExeSection;override;
         procedure Order_ObjSection(const aname:string);override;
+        procedure MemPos_Start;override;
         procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
         function writeData:boolean;override;
       end;
@@ -3760,6 +3761,15 @@ cleanup:
         TmpObjSectionList.Free;
       end;
 
+    procedure TNewExeOutput.MemPos_Start;
+      var
+        i: Integer;
+      begin
+        inherited MemPos_Start;
+        for i:=0 to ExeSectionList.Count-1 do
+          MemPos_ExeSection(TExeSection(ExeSectionList[i]));
+      end;
+
     procedure TNewExeOutput.GenerateLibraryImports(ImportLibraryList: TFPHashObjectList);
       var
         i,j: longint;