mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 13:29:21 +02:00
+ import DGROUP omf fixup references
git-svn-id: trunk@31390 -
This commit is contained in:
parent
73ea3b7ff1
commit
e88dc71983
@ -1489,6 +1489,7 @@ implementation
|
|||||||
sym: TObjSymbol;
|
sym: TObjSymbol;
|
||||||
RelocType: TObjRelocationType;
|
RelocType: TObjRelocationType;
|
||||||
target_section: TOmfObjSection;
|
target_section: TOmfObjSection;
|
||||||
|
target_group: TOmfObjSectionGroup;
|
||||||
begin
|
begin
|
||||||
Result:=False;
|
Result:=False;
|
||||||
|
|
||||||
@ -1647,6 +1648,45 @@ implementation
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
else if Fixup.TargetMethod in [ftmGroupIndex,ftmGroupIndexNoDisp] then
|
||||||
|
begin
|
||||||
|
target_group:=TOmfObjSectionGroup(objdata.GroupsList[Fixup.TargetDatum-1]);
|
||||||
|
if target_group.Name<>'DGROUP' then
|
||||||
|
begin
|
||||||
|
InputError('Fixup target group other than "DGROUP" is not supported');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
case Fixup.LocationType of
|
||||||
|
fltBase:
|
||||||
|
case Fixup.Mode of
|
||||||
|
fmSegmentRelative:
|
||||||
|
RelocType:=RELOC_DGROUP;
|
||||||
|
fmSelfRelative:
|
||||||
|
RelocType:=RELOC_DGROUPREL;
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
InputError('Unsupported fixup location type '+IntToStr(Ord(Fixup.LocationType))+' in reference to group '+target_group.Name);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
reloc:=TOmfRelocation.CreateSection(Fixup.LocationOffset,nil,RelocType);
|
||||||
|
objsec.ObjRelocations.Add(reloc);
|
||||||
|
case Fixup.FrameMethod of
|
||||||
|
ffmTarget:
|
||||||
|
{nothing};
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
InputError('Unsupported frame method '+IntToStr(Ord(Fixup.FrameMethod))+' in reference to group '+target_group.Name);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Fixup.TargetDisplacement<>0 then
|
||||||
|
begin
|
||||||
|
InputError('Unsupported nonzero target displacement '+IntToStr(Fixup.TargetDisplacement)+' in reference to group '+target_group.Name);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{todo: convert other fixup types as well }
|
{todo: convert other fixup types as well }
|
||||||
|
Loading…
Reference in New Issue
Block a user