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]

Re: [PATCH] Improved elf linker error message


Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> writes:

> +  else
> +    {
> +      (*_bfd_error_handler) (
> +        _("%s: relocation size mismatch in %s section %s"),
> +        bfd_get_filename (output_bfd),
> +        bfd_get_filename (input_section->owner),
> +        input_section->name);
> +      abort();
> +    }

It seems to me that this error could occur if the user calls the
linker with the wrong input files.  If that is true, it seems vaguely
troubling to me that the linker calls abort().  The linker should only
call abort() on an internal error.  This is a user error.  For a user
error, the linker should print an error message and fail.

Would it be possible to change elf_link_output_relocs() to have a
non-void return type, and check for an error return?

Ian


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