* 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 -
This commit is contained in:
pierre 2010-09-29 12:58:21 +00:00
parent bd0567563c
commit fa4b4906e6
2 changed files with 6 additions and 5 deletions

View File

@ -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));

View File

@ -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