Re: [PATCH] Include minimal symbol flavour name in LOC_UNRESOLVED error message.

Doug Evans
2015-08-29T23:37:00Z

Doug Evans <xdje42@gmail.com> writes:
> Hi.
>
> The error message that is printed if a LOC_UNRESOLVED minsym isn't
> found can be a bit confusing. The goal here is to clarify what the
> term "symbol" means in the error message.
>...
> 2015-08-29 Doug Evans <xdje42@gmail.com>
>
> bfd/
> * targets.c (enum bfd_flavour): Add comment.
> (bfd_flavour_name): New function.
> * bfd-in2.h: Regenerate.
>...
> +const char *
> +bfd_flavour_name (bfd *abfd)
> +{
> + switch (abfd->xvec->flavour)

Btw, a better way to do this would be to take the flavour enum
as the parameter instead of the bfd. Why does the caller
have to have a bfd in order to get the print form of the
enum? I'll do that assuming the patch is otherwise ok.

Callers with a bfd could then just do
bfd_flavour_name (bfd_get_flavour (abfd)).