summaryrefslogtreecommitdiff
path: root/compiler/ogcoff.pas
diff options
context:
space:
mode:
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 }