This is the mail archive of the binutils@sources.redhat.com 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] |
I disagree. The library should never abort. I can see the case for reporting internal errors with a sensible error message, but an abort (even with a message) is not correct. Possibly the caller of the library will be able to cope with the error and try another way to perform its function. Or maybe partial completion of the library's functions will allow the user to proceed further with the work that they are doing. Either way the library is providing a service to its caller. It should not dictate that the caller must terminate execution. Instead it should provide a sensible error indication and allow the caller to decide what to do.I don't think it is a good idea. Linker should try to avoid core dump on bad input. But linker should abort/core dump when there is an internal bug. In this particular case, core dump helped uncover/fix the linker bug. Otherwise, we might discover this bug much later. I suggest we back out this patch or change it to
if (abfd == NULL)
abort ();
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |