[PATCH] bfd: Fix 64-bit relocation handling for a.out

Nick Clifton nickc@redhat.com
Tue May 5 09:28:20 GMT 2020
Hi Gunther,

> I have an update which ensures only supported sizes are permitted. 
> Thoughts?

I like it.  I only have one comment:

> +  switch (bfd_get_reloc_size (g->howto))
> +    {
> +      default:
> +	_bfd_error_handler (_("%pB: unsupported relocation size"), abfd);

vs...

> +	switch (bfd_get_reloc_size (howto))
> +	  {
> +	    default:
> +	      abort ();

I far prefer error messages (and error return codes, if available) to 
calling abort.  As a user I find having an error message telling me at
least something about what is wrong to be much more useful than an a
abort referring to source code that I may not even have available.

Cheers
  Nick




More information about the Binutils mailing list