summaryrefslogtreecommitdiff
path: root/compiler/ogcoff.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /compiler/ogcoff.pas
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ogcoff.pas')
-rw-r--r--compiler/ogcoff.pas12
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas
index c4bc96cfc5..e17d776394 100644
--- a/compiler/ogcoff.pas
+++ b/compiler/ogcoff.pas
@@ -1665,6 +1665,13 @@ const pemagic : array[0..3] of byte = (
strname : string;
auxrec : array[0..17] of byte;
objsec : TObjSection;
+
+ { keeps string manipulations out of main routine }
+ procedure UnsupportedSymbolType;
+ begin
+ Comment(V_Fatal,'Unsupported COFF symbol type '+tostr(sym.typ)+' at index '+tostr(symidx)+' while reading '+InputFileName);
+ end;
+
begin
with TCoffObjData(objdata) do
begin
@@ -1738,8 +1745,7 @@ const pemagic : array[0..3] of byte = (
end;
COFF_SYM_SECTION :
begin
- if sym.section=0 then
- InputError('Failed reading coff file, illegal section');
+ { GetSection checks that index is in range }
objsec:=GetSection(sym.section);
if assigned(objsec) then
begin
@@ -1757,7 +1763,7 @@ const pemagic : array[0..3] of byte = (
COFF_SYM_FILE :
;
else
- internalerror(200602232);
+ UnsupportedSymbolType;
end;
FSymTbl^[symidx]:=objsym;
{ read aux records }