diff options
author | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-06-01 22:48:51 +0000 |
---|---|---|
committer | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-06-01 22:48:51 +0000 |
commit | 812f4a6f02a8edbe6ef5cf619aa44e2825fe6265 (patch) | |
tree | a9470290cefdc94e2d8441b05f85bde29e92eee1 /compiler/ogrel.pas | |
parent | 0d92251ace350d5c160562117344c9c6608276cd (diff) | |
download | fpc-812f4a6f02a8edbe6ef5cf619aa44e2825fe6265.tar.gz |
* group T and R records together and call a function (not implemented yet) to handle them in pairs
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45561 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ogrel.pas')
-rw-r--r-- | compiler/ogrel.pas | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/compiler/ogrel.pas b/compiler/ogrel.pas index bd19010063..745dfa2e75 100644 --- a/compiler/ogrel.pas +++ b/compiler/ogrel.pas @@ -657,6 +657,13 @@ implementation end; function TRelObjInput.ReadObjData(AReader: TObjectreader; out Data: TObjData): boolean; + + function HandleTR(const T,R: string): boolean; + begin + { todo: implement } + result:=true; + end; + const GenericRelErrMsg='Error reading REL file'; var @@ -668,6 +675,7 @@ implementation tmpint: SizeInt; CurrSec: TObjSection=nil; objsym: TObjSymbol; + LastT: string=''; begin FReader:=AReader; InputFileName:=AReader.FileName; @@ -891,11 +899,23 @@ implementation end; 'T': { T line () } begin - { todo: implement } + if LastT<>'' then + begin + InputError('T record not followed by R record'); + exit; + end; + LastT:=s; end; 'R': { R line (relocation information) } begin - { todo: implement } + if LastT='' then + begin + InputError('R record without T record'); + exit; + end; + if not HandleTR(LastT,s) then + exit; + LastT:=''; end; 'P': { P line (paging information) } begin |