Browse Source

Merged revisions 7122,7126-7127 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r7122 | pierre | 2007-04-17 16:25:06 +0200 (Tue, 17 Apr 2007) | 1 line

* fix for tw3661 failure for linux
........
r7126 | pierre | 2007-04-18 01:09:09 +0200 (Wed, 18 Apr 2007) | 1 line

* force empty .idata section at end of each dll to be in executable with oso_keep option
........
r7127 | pierre | 2007-04-18 01:09:51 +0200 (Wed, 18 Apr 2007) | 1 line

* stabs info for this if in register
........

git-svn-id: branches/fixes_2_2@7195 -

joost 18 năm trước cách đây
mục cha
commit
1c4bd4befd
2 tập tin đã thay đổi với 17 bổ sung8 xóa
  1. 14 8
      compiler/dbgstabs.pas
  2. 3 0
      compiler/ogcoff.pas

+ 14 - 8
compiler/dbgstabs.pas

@@ -1233,10 +1233,13 @@ implementation
                   begin
                     if (sym.localloc.loc=LOC_REFERENCE) then
                       result:=sym_stabstr_evaluate(sym,'"pvmt:p$1",${N_TSYM},0,0,$2',
-                        [def_stab_number(pvmttype),tostr(sym.localloc.reference.offset)]);
-      (*            else
-                      result:=sym_stabstr_evaluate(sym,'"pvmt:r$1",${N_RSYM},0,0,$2',
-                        [def_stab_number(pvmttype),tostr(regstabs_table[regidx])]) *)
+                        [def_stab_number(pvmttype),tostr(sym.localloc.reference.offset)])
+                    else
+                      begin
+                        regidx:=findreg_by_number(sym.localloc.register);
+                        result:=sym_stabstr_evaluate(sym,'"pvmt:r$1",${N_RSYM},0,0,$2',
+                          [def_stab_number(pvmttype),tostr(regstabs_table[regidx])]);
+                      end
                     end
                 else
                   begin
@@ -1246,10 +1249,13 @@ implementation
                       c:='p';
                     if (sym.localloc.loc=LOC_REFERENCE) then
                       result:=sym_stabstr_evaluate(sym,'"$$t:$1",${N_TSYM},0,0,$2',
-                            [c+def_stab_number(tprocdef(sym.owner.defowner)._class),tostr(sym.localloc.reference.offset)]);
-      (*            else
-                      result:=sym_stabstr_evaluate(sym,'"$$t:r$1",${N_RSYM},0,0,$2',
-                            [c+def_stab_number(tprocdef(sym.owner.defowner)._class),tostr(regstabs_table[regidx])]); *)
+                            [c+def_stab_number(tprocdef(sym.owner.defowner)._class),tostr(sym.localloc.reference.offset)])
+                    else
+                      begin
+                        regidx:=findreg_by_number(sym.localloc.register);
+                        result:=sym_stabstr_evaluate(sym,'"$$t:r$1",${N_RSYM},0,0,$2',
+                            [c+def_stab_number(tprocdef(sym.owner.defowner)._class),tostr(regstabs_table[regidx])]);
+                      end
                   end;
               end
             else

+ 3 - 0
compiler/ogcoff.pas

@@ -2288,6 +2288,9 @@ const pemagic : array[0..3] of byte = (
           internalobjdata.writebytes(emptyint,sizeof(emptyint));
           if target_info.system=system_x86_64_win64 then
             internalobjdata.writebytes(emptyint,sizeof(emptyint));
+          { be sure that this will not be removed }
+          idata4objsection.SecOptions:=idata4objsection.SecOptions + [oso_keep];
+          idata5objsection.SecOptions:=idata5objsection.SecOptions + [oso_keep];
         end;
 
         function AddImport(const afuncname,amangledname:string; AOrdNr:longint;isvar:boolean):TObjSymbol;