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: Return NULL on NULL bfd (Problem with linker with binutils-040414)

> -----Original Message-----
> From: binutils-owner On Behalf Of Nick Clifton
> Sent: 20 April 2004 16:17

> Hi H. J.
> >I am having the second thought. bfd_archive_filename was invented for
> >bfd error reporting. It is used as
> >  
> >
> Surely if it is intended for error reporting then it is 
> better that it 
> returns a bogus filename such as "<unknown>" rather than 
> seg-faulting as 
> otherwise the actual error message will never be displayed.
> Cheers
>   Nick

  Well, there's *two* errors here; one is an error that is predictable and
handled gracefully by bfd, which tries to display a message; the other is an
internal coding error in the bfd library, which can't be handled.  So rather
than saying that the 'actual' error message isn't displayed, I'd rather
suggest that in the abort case it is the 'most serious' error message that
gets displayed.  And I'd also point out that if you return a 'bogus'
filename, what subsequently gets displayed is *not* the 'actual' error, but
a mangled and misleading misrepresentation of whatever the original error
was actually trying to say.....

Can't think of a witty .sigline today....

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