mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 18:47:52 +02:00
* ogcoff.pas: when encountering symbol of unsupported type in input object file, give a meaningful error message instead of internal error. Mantis #27020.
- removed repeating check of section index. git-svn-id: trunk@29062 -
This commit is contained in:
parent
13a069c9d2
commit
8c61990078
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user