瀏覽代碼

+ fill the program entry point address in the NewExe header

git-svn-id: trunk@42571 -
nickysn 6 年之前
父節點
當前提交
dbafff24fe
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/ogomf.pas

+ 2 - 0
compiler/ogomf.pas

@@ -3666,6 +3666,8 @@ cleanup:
 
     function TNewExeOutput.WriteNewExe: boolean;
       begin
+        Header.InitialIP:=EntrySym.address;
+        Header.InitialCS:=TNewExeSection(EntrySym.objsection.ExeSection).MemBasePos;
         Header.WriteTo(FWriter);
         { todo: write the rest of the file as well }
         Result:=True;