瀏覽代碼

* 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 年之前
父節點
當前提交
30e7406be3
共有 1 個文件被更改,包括 10 次插入0 次删除
  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;