|
@@ -840,10 +840,10 @@ const pemagic : array[0..3] of byte = (
|
|
|
{$ifdef arm}
|
|
|
RELOC_RELATIVE_24:
|
|
|
begin
|
|
|
- relocval:=(relocval - mempos - objreloc.dataoffset) shr 2 - 2;
|
|
|
+ relocval:=longword(relocval - mempos - objreloc.dataoffset) shr 2 - 2;
|
|
|
address:=address or (relocval and $ffffff);
|
|
|
relocval:=relocval shr 24;
|
|
|
- if (relocval<>$ff) and (relocval<>0) then
|
|
|
+ if (relocval<>$3f) and (relocval<>0) then
|
|
|
internalerror(200606085); { offset overflow }
|
|
|
end;
|
|
|
{$endif arm}
|
|
@@ -2604,7 +2604,7 @@ const pemagic : array[0..3] of byte = (
|
|
|
if not (objreloc.typ in [{$ifdef x86_64}RELOC_ABSOLUTE32,{$endif x86_64}RELOC_ABSOLUTE]) then
|
|
|
continue;
|
|
|
offset:=objsec.MemPos+objreloc.dataoffset;
|
|
|
- if offset<pgaddr then
|
|
|
+ if (offset<pgaddr) and (pgaddr<>longword(-1)) then
|
|
|
Internalerror(2007062701);
|
|
|
if (offset-pgaddr>=4096) or (pgaddr=longword(-1)) then
|
|
|
begin
|