* group T and R records together and call a function (not implemented yet) to handle them in pairs

git-svn-id: trunk@45561 -
This commit is contained in:
nickysn 2020-06-01 22:48:51 +00:00
parent a91b42bd8d
commit ad66f17a87

View File

@ -657,6 +657,13 @@ implementation
end; end;
function TRelObjInput.ReadObjData(AReader: TObjectreader; out Data: TObjData): boolean; function TRelObjInput.ReadObjData(AReader: TObjectreader; out Data: TObjData): boolean;
function HandleTR(const T,R: string): boolean;
begin
{ todo: implement }
result:=true;
end;
const const
GenericRelErrMsg='Error reading REL file'; GenericRelErrMsg='Error reading REL file';
var var
@ -668,6 +675,7 @@ implementation
tmpint: SizeInt; tmpint: SizeInt;
CurrSec: TObjSection=nil; CurrSec: TObjSection=nil;
objsym: TObjSymbol; objsym: TObjSymbol;
LastT: string='';
begin begin
FReader:=AReader; FReader:=AReader;
InputFileName:=AReader.FileName; InputFileName:=AReader.FileName;
@ -891,11 +899,23 @@ implementation
end; end;
'T': { T line () } 'T': { T line () }
begin begin
{ todo: implement } if LastT<>'' then
begin
InputError('T record not followed by R record');
exit;
end;
LastT:=s;
end; end;
'R': { R line (relocation information) } 'R': { R line (relocation information) }
begin begin
{ todo: implement } if LastT='' then
begin
InputError('R record without T record');
exit;
end;
if not HandleTR(LastT,s) then
exit;
LastT:='';
end; end;
'P': { P line (paging information) } 'P': { P line (paging information) }
begin begin