mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:09:11 +02:00
* More correct fix for overflow check for RELOC_RELATIVE_24.
* Fixed 2007062701 while linking DLL. git-svn-id: trunk@11484 -
This commit is contained in:
parent
c92c034882
commit
eb9c9c77d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user