mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 22:20:19 +02:00
+ optimization: don't emit relative relocation entries to the same section in
the omf obj writer git-svn-id: trunk@30808 -
This commit is contained in:
parent
d0b365c99a
commit
328a4fa19a
@ -472,6 +472,14 @@ implementation
|
||||
objreloc:=TOmfRelocation.CreateSymbol(CurrObjSec.Size,p,Reloctype);
|
||||
CurrObjSec.ObjRelocations.Add(objreloc);
|
||||
end
|
||||
{ relative relocations within the same section can be calculated directly,
|
||||
without the need to emit a relocation entry }
|
||||
else if (p.objsection=CurrObjSec) and
|
||||
(p.bind<>AB_COMMON) and
|
||||
(Reloctype=RELOC_RELATIVE) then
|
||||
begin
|
||||
data:=data+symaddr-len-CurrObjSec.Size;
|
||||
end
|
||||
else
|
||||
begin
|
||||
objreloc:=TOmfRelocation.CreateSection(CurrObjSec.Size,p.objsection,Reloctype);
|
||||
|
Loading…
Reference in New Issue
Block a user