This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS/BFD: Fix assertions with SGI IRIX files

"Maciej W. Rozycki" <> writes:
> Hello,
>  If an SGI IRIX ELF variation binary (also produced by binutils for some 
> target configurations) is loaded into GDB configured for the traditional 
> MIPS ELF variation, then a load of assertion failures is spat.  They 
> actually come from BFD being confused.
>  As no user input, however unreasonable, should ever trigger assertions 
> and this is simply a case of an unsupported binary format, here's a fix to 
> convert the offending code to do proper error reporting instead.
>  Verified manually with GDB, the error messages are produced.  I was 
> unable to trigger this problem with the linker, even though this piece of 
> code looks reachable within to me.

How about just dropping the assertions?  SHN_MIPS_TEXT and SHN_MIPS_DATA
are easy to handle, and it looks like the code will behave sensibly
regardless of SGI_COMPAT.  I realise you might be thinking that the user
would like to know that they have the "wrong" emulation.  But if this
is the only detectable difference, it's better just to carry on.
If there are other detectable differences that cause real problems,
we should try to diagnose the problem there instead.

A patch to remove the assertions is pre-approved if you agree that's OK.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]