2
0
Эх сурвалжийг харах

* 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 жил өмнө
parent
commit
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_ExeSection(const aname:string);override;
         procedure Order_EndExeSection;override;
         procedure Order_EndExeSection;override;
         procedure Order_ObjSection(const aname:string);override;
         procedure Order_ObjSection(const aname:string);override;
+        procedure MemPos_Start;override;
         procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
         procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
         function writeData:boolean;override;
         function writeData:boolean;override;
       end;
       end;
@@ -3760,6 +3761,15 @@ cleanup:
         TmpObjSectionList.Free;
         TmpObjSectionList.Free;
       end;
       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);
     procedure TNewExeOutput.GenerateLibraryImports(ImportLibraryList: TFPHashObjectList);
       var
       var
         i,j: longint;
         i,j: longint;