瀏覽代碼

* Fixed writing of external debug info when reloc section should be created.

git-svn-id: trunk@13146 -
yury 16 年之前
父節點
當前提交
ede93974bc
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/ogcoff.pas

+ 3 - 1
compiler/ogcoff.pas

@@ -250,6 +250,7 @@ interface
        TPECoffexeoutput = class(TCoffexeoutput)
        TPECoffexeoutput = class(TCoffexeoutput)
        private
        private
          idatalabnr : longword;
          idatalabnr : longword;
+         FRelocsGenerated : boolean;
          procedure GenerateRelocs;
          procedure GenerateRelocs;
        public
        public
          constructor create;override;
          constructor create;override;
@@ -2648,7 +2649,7 @@ const pemagic : array[0..3] of byte = (
         offset : longword;
         offset : longword;
         w: word;
         w: word;
       begin
       begin
-        if not RelocSection then
+        if not RelocSection or FRelocsGenerated then
           exit;
           exit;
         exesec:=FindExeSection('.reloc');
         exesec:=FindExeSection('.reloc');
         if exesec=nil then
         if exesec=nil then
@@ -2695,6 +2696,7 @@ const pemagic : array[0..3] of byte = (
               end;
               end;
           end;
           end;
         FinishBlock;
         FinishBlock;
+        FRelocsGenerated:=true;
       end;
       end;