Selaa lähdekoodia

* ogcoff.pas: Add support for RELOC_SECREL32.
* cfidwarf.pas: Fix CIE pointer inside dwarf-FDE entry which must be
a section relative offset.

git-svn-id: trunk@16062 -

pierre 15 vuotta sitten
vanhempi
commit
fa4b4906e6
2 muutettua tiedostoa jossa 6 lisäystä ja 5 poistoa
  1. 3 3
      compiler/cfidwarf.pas
  2. 3 2
      compiler/ogcoff.pas

+ 3 - 3
compiler/cfidwarf.pas

@@ -322,15 +322,15 @@ implementation
                   current_asmdata.getlabel(lenendlabel,alt_dbgframe);
                   { FDE
                      DWORD length
-                     DWORD CIE-pointer = cielabel
+                     DWORD CIE-pointer = cielabel relative to section start
                      PTRSIZE initial location = oper[0]
                      PTRSIZE function size = oper[1]
                   }
                   list.concat(tai_const.create_rel_sym(aitconst_32bit,lenstartlabel,lenendlabel));
                   list.concat(tai_label.create(lenstartlabel));
-                  { force label offset to 32bit }
+                  { force label offset to secrel32 }
                   tc:=tai_const.create_sym(cielabel);
-                  tc.consttype:=aitconst_32bit;
+                  tc.consttype:=aitconst_secrel32_symbol;
                   list.concat(tc);
                   list.concat(tai_const.create_sym(hp.oper[0].beginsym));
                   list.concat(tai_const.create_rel_sym(aitconst_ptr,hp.oper[0].beginsym,hp.oper[0].endsym));

+ 3 - 2
compiler/ogcoff.pas

@@ -1096,9 +1096,10 @@ const pemagic : array[0..3] of byte = (
                       //inc(data,symaddr-len-CurrObjSec.Size);
                       data:=data+symaddr-len-CurrObjSec.Size;
                     end;
-                  RELOC_RVA :
+                  RELOC_RVA,
+                  RELOC_SECREL32 :
                     begin
-                      CurrObjSec.addsectionreloc(curraddr,CurrObjSec,RELOC_RVA);
+                      CurrObjSec.addsectionreloc(curraddr,CurrObjSec,reloctype);
                       inc(data,symaddr);
                     end;
                   else