* x86_64-win64: fixed handling of RELOC_RELATIVE_1..RELOC_RELATIVE_5 COFF relocations, they were off by 4 bytes, causing failure in tests/test/tcalext.pp.

git-svn-id: trunk@27430 -
This commit is contained in:
sergei 2014-04-01 16:26:56 +00:00
parent f35860b33a
commit db621780d5

View File

@ -917,27 +917,27 @@ const pemagic : array[0..3] of byte = (
RELOC_RELATIVE_1: RELOC_RELATIVE_1:
begin begin
address:=address-objsec.mempos+relocval; address:=address-objsec.mempos+relocval;
dec(address,objreloc.dataoffset+1); dec(address,objreloc.dataoffset+5);
end; end;
RELOC_RELATIVE_2: RELOC_RELATIVE_2:
begin begin
address:=address-objsec.mempos+relocval; address:=address-objsec.mempos+relocval;
dec(address,objreloc.dataoffset+2); dec(address,objreloc.dataoffset+6);
end; end;
RELOC_RELATIVE_3: RELOC_RELATIVE_3:
begin begin
address:=address-objsec.mempos+relocval; address:=address-objsec.mempos+relocval;
dec(address,objreloc.dataoffset+3); dec(address,objreloc.dataoffset+7);
end; end;
RELOC_RELATIVE_4: RELOC_RELATIVE_4:
begin begin
address:=address-objsec.mempos+relocval; address:=address-objsec.mempos+relocval;
dec(address,objreloc.dataoffset+4); dec(address,objreloc.dataoffset+8);
end; end;
RELOC_RELATIVE_5: RELOC_RELATIVE_5:
begin begin
address:=address-objsec.mempos+relocval; address:=address-objsec.mempos+relocval;
dec(address,objreloc.dataoffset+5); dec(address,objreloc.dataoffset+9);
end; end;
RELOC_ABSOLUTE32, RELOC_ABSOLUTE32,
{$endif x86_64} {$endif x86_64}