From fa4b4906e6b5640e2a9c1c73f3b9e109758ca1ad Mon Sep 17 00:00:00 2001 From: pierre Date: Wed, 29 Sep 2010 12:58:21 +0000 Subject: [PATCH] * 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 - --- compiler/cfidwarf.pas | 6 +++--- compiler/ogcoff.pas | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/cfidwarf.pas b/compiler/cfidwarf.pas index 9f8700fc0f..7726d70616 100644 --- a/compiler/cfidwarf.pas +++ b/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)); diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas index f944fe2c7f..4edda0551a 100644 --- a/compiler/ogcoff.pas +++ b/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